stretch spiral1-d properly
This commit is contained in:
parent
0a720971ba
commit
d87ab053cb
|
@ -149,9 +149,10 @@ pub fn spiral(k: u32) -> impl Fn(f64) -> [f64; 2] {
|
|||
}
|
||||
|
||||
pub fn spiral_1d(k: u32) -> impl Fn(f64) -> [f64; 2] {
|
||||
let x2pi = (k as f64) * core::f64::consts::TAU;
|
||||
let k = k as f64;
|
||||
let x2pi = k * core::f64::consts::TAU;
|
||||
move |t: f64| {
|
||||
let ttcos = (t * core::f64::consts::TAU).cos();
|
||||
let ttcos = k * (t * core::f64::consts::TAU).cos();
|
||||
let ttxsin = (t * x2pi).sin();
|
||||
[ttcos, ttxsin]
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue