I saw a topic on ordfoce.net on unrolling spirals and discrete paths as shown here:
How can I replicate this in Animation Nodes?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
It has the following steps:
1) First sample the base spline (which going to be folded) i.e sample points and divide the sample points into two lists L1 (length_Max - length_L2) and L2 (length_L2).
2) Get the last point of L1 and use this point to transfer the folded shape (circle or spiral)
3) Then map the L2 points to folded shape (circle or spiral which can have any number of points) and then store the mapped points in the new list L.
4) Combine the list L and L1 i.e (L + L1) and use these points for the new spline.
5) By animating the length of the L1 and L2 lists, you can animate the folding spline or curve.
Sample the spline and divide the sample points using slice node, one with start (L1) and other with end (L2) option which is control by the integer input node (called it as Offset Index). The use of reverse node to start the folding from the end of the base spline.
Then use the last point of L1 to transfer the shape along the spline. This will transfer the whole shape points (folding shape) at the last point. But to offset the shape (in this case circle) such that its circumference touch the spline, use vector math node (ADD) and add the radius of the shape into z-axis (you can choose any direction) and adjust the rotation such that it align correct along z-axis.
Now, use base spline normal (last point as in L1 case) to align the folding shape on every point i.e you do dot need to align the shape manually, this automatic align the shape with respect to the the base spline normal when you change the Offset Index.
Step-4 and Step-5
You have the transferred shape points and L2 points. Now mix them using the vector mix node in a loop with factor = 1. Then combine the mixed points with existing L1 points using vector combine list node and these are final points (yellow) which you can use to make new spline.