How should we replicate this animation within Animation Nodes 2.1?
By: https://twitter.com/InfinityLoopGIF/status/1085886521205538817
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:
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: