How should we replicate this animation within Animation Nodes 2.1?


By: https://twitter.com/InfinityLoopGIF/status/1085886521205538817


We start by creating a helix using the following equation:

$$ \begin{aligned} x &= \cos{ft}\\ y &= \sin{ft}\\ z &= t \end{aligned} $$

Where $t\in[-1, 1]$ and $f$ is a factor of frequency. This is implemented in Animation Nodes as follows:


We then vary the radius of the helix such that it lies on a unit sphere. To do so, we note that since $t\in[-1,1]$ represents the z location of the points, then $\sqrt{1-t^2}$ represents the $x$ location of the point if the point lie on a unit circle, or in our case, a cross-section of a unit sphere. This is due to the fact that:

$$ \cos^2{t} + \sin^2{t} = 1 $$

Hence our equation become:

$$ \begin{aligned} x &= \sqrt{1-t^2}\cos{ft}\\ y &= \sqrt{1-t^2}\sin{ft}\\ z &= t \end{aligned} $$

which can be implemented as follows:

Sphere Spiral

This gives us only half of the spiral, to get the full spiral, we flip the spiral and combine it with the original as follows:

Full Spiral

We then use those vectors to construct a spline:

Construct Spline

We then replicate the output spline by rotating it along the z axis with angles of:

$$ \frac{i\pi}{n} \ \forall \ i \in \{0\dots n-1\} $$

Where $n$ is the number of splines. This is implemented as follows:

Replicate Spline

Which gives this result:


  • $\begingroup$ I love how you use maths and nodes here. Great for others to do brainpicking. Do you know any book on abstract algebra that you could recommend to absolute novice like myself? I am few weeks learning it. $\endgroup$ – Rita Geraghty stands by Monica Jan 23 '19 at 18:07
  • 1
    $\begingroup$ @RitaGeraghty I don't know abstract algebra myself, so you probably know more than I do. Reading is useful, but you have to start applying, knowing theory doesn't translate easily into implementation knowledge. $\endgroup$ – Omar Emara Jan 23 '19 at 18:16
  • $\begingroup$ Omar, ok. Thanks. I know just intermediate maths. I'm now relearning maths. I once did honour maths, but I've forgotten them. $\endgroup$ – Rita Geraghty stands by Monica Jan 23 '19 at 18:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.