2

How can one create a rope winding animation as shown here:

Animation

Source: https://vimeo.com/238181837

Omar Emara
  • 22,639
  • 5
  • 55
  • 103
Ethan Liu
  • 69
  • 4

1 Answers1

9

A helix is described using the parametric equation:

$$ \vec{r} = \begin{bmatrix} \alpha t \\ r\cos{t} \\ r\sin{t} \end{bmatrix} $$

Where $\alpha$ is some scalar controlling the "wavelength" of the helix and $r$ is the radius. Sampling some points and creating a spline from them, we get:

Node Tree 1

By driving the amount of samples based on time, we get:

Node Tree 2

We can see in the reference that the helix extends tangentially for some units. To compute the position of the point that creates that extension, we have to compute the tangent of the helix at the last point. So by differentiating the parametric equation we get:

$$ \vec{r}^{\, \prime} = \begin{bmatrix} \alpha \\ -r\sin{t} \\ r\cos{t} \end{bmatrix} $$

The position of the new point is the position of the last point plus a scalar multiple of the tangent at it. So the node tree becomes:

Node Tree 3

Where the index $-1$ gets us the last point. Note that instead of computing the tangent from scratch, we used the similarity between the function and its derivative to compute the tangent.

We notice that the spline intersects the cylinder, to fix that, we add the radius of the spline to the radius of the helix:

Node Tree 3

Omar Emara
  • 22,639
  • 5
  • 55
  • 103