Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Spiral =
- {
- class Note {
- constructor(index) {
- this.pos = get_note_pos(i);
- }
- // blabla
- }
- constructor() {
- this.z1_radius = math.pow( .3 , 1/this.notes ); // <-- radius of innermost note
- this.z1 = math.complex({ r:this.z1_radius, phi:τ/12 });
- // Find ∂ s.t. spiral * (1+∂)^+1 and spiral * (1+∂)^-1 meet as single amonite-groove
- // i.e. outside edge 1 rev in = inside edge
- // z^12 * (1+∂) = 1/(1+∂) (12 hops => back to real numberline)
- // z^12 = (1+∂)^-2
- // 1+∂ = z^12 ^ -1/2 = z^-6
- this.amonite_∂ = math.pow( this.z1_radius, -6 ) - 1;
- // equation of spiral: z(ϕ) = z1^(wϕ)
- // with w chosen s.t. z(τ/12) = z1^1 = z1
- // i.e. z1^(w.τ/12) = z1^1, so w.τ/12=1, so w=12/τ
- // so: z(ϕ) = z1^(ϕ.12/τ)
- // length of spine for button 0
- // ∫z^(wϕ) dϕ over [-τ/24, +τ/24] (with w s.t. ϕ=τ/12 gives wϕ=1 i.e. w=12/τ)
- // i.e. at angle τ/12, we want z^1
- this.arc_0 = (root_r - 1/root_r) * τ / ( 12 * Math.log(r) );
- this.notes = new Array(88);
- for( i=0; i<this.notes.length; i++ )
- this.notes[i] = new Note(i);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement