Comment by pimlottc

Comment by pimlottc 3 days ago

3 replies

I was wondering about the “correctness” of the z-axis movement for the spherical helix. You could pick lots of different functions, including simple linear motion (z = c * t). This would obviously affect the thickness and consistency of the “peels”.

The equation used creates a visually appealing result but I’m wondering what a good goal would be in terms of consistency in the distance between the spirals, or evenness in area divided, or something like that.

How was this particular function selected? Was it derived in some way or simply hand-selected to look pleasing?

crdrost 3 days ago

I think this particular function was selected because it happened to be convenient to program and the visual effect was pleasant enough.

The actual "correct" thing to do would probably be to have the point maintain constant speed in 3D space like a real boat sailing on a globe, right? But that's a rather bigger lift:

    const degrees = Math.PI / 180;
    const bearing = 5 * degrees; // or it might be 85 degrees? Not sure off the top of my head
    const k = Math.tan(bearing);
    const v = 0.001 // some velocity, adjust as needed
    const phi = (t) => v*t/Math.sqrt(1 + k*k) // the sqrt is not strictly needed
    const theta = (t) => k*Math.ln(Math.tan(phi(t)/2)) // this is the annoying one haha
with outputs,

    const x = (t) => Math.sin(phi(t)) * Math.cos(theta(t))
    const y = (t) => Math.sin(phi(t)) * Math.sin(theta(t))
    const z = (t) => Math.cos(phi(t))
I doubt that they did the ln(tan(phi/2)) thing though, but it's what you get when you integrate the k d{phi} = sin{phi} d{theta} equation that you have here.
damarberlari 3 days ago

> You could pick lots of different functions, including simple linear motion (z = c * t)

that was also my first intuition when making this, but turned out making the z function linear won't make it a sphere.

to make a sphere, you have to configure it in a way so that it forms a circle with the other axes. In this vis, its the sin(0.02 * πt) and cos(0.02 * πt) part that do this.

someone makes an interactive version here: https://www.desmos.com/3d/t66etxi1y8 (thanks!) so you can try changing the z function for yourself.

patrickthebold 3 days ago

Just a thought: Make the velocity of the path constant. There should be some way to take a derivative an set it to a constant and solve for z. ( or really reparameterize the curve t' = f(t)) so the velocity is constant.

Actually, now that I think about it, choosing z = c * t is kind of both influencing how the path is parameterized as well as the path carved out on the sphere.