# Replicate Animation with AN 2.1

How should we replicate this animation within Animation Nodes 2.1?

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:

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:

We then use those vectors to construct a 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:

Which gives this result:

• 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. – Rita Geraghty Jan 23 at 18:07
• @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. – Omar Emara Jan 23 at 18:16
• Omar, ok. Thanks. I know just intermediate maths. I'm now relearning maths. I once did honour maths, but I've forgotten them. – Rita Geraghty Jan 23 at 18:37