Jump to content

Spiral Unrolling / Rolling Animation

Recommended Posts

If you know VEX, you can use an attribute wrangle inside a solver. Here is a rough sketch..

Set up a (quadratic) spiral:

float rounds = (@numpt - 1) * 0.5;
float grad = 1 - ( @ptnum / float(@numpt - 1) );
float spiral = (rounds * $PI * grad);
@P.x = cos(spiral);
@P.y = sin(spiral);
@P *= grad;

Unroll the curve inside a solver:

int pt = int( ceil(@Time) );
float amount = ( radians(@Time % 1.0) * $PI * 2.5 );
matrix m = ident();
vector axis = set(0, 0, 1);
vector offset = point(0, "P", pt);
if(@ptnum > pt) {
    @P -= offset;
    rotate(m, amount, axis);
    @P *= m;
    @P += offset;

To get the wavy curve, merge it with a trail SOP running on the last point.

Useful links:



Example file:


Edited by konstantin magnus
  • Like 1
  • Thanks 2

Share this post

Link to post
Share on other sites

I'd looked at this problem a few weeks ago, got 90% the way there looking at some other odforce posts, this inspired me to finish it. :)

The idea is to first calculate the angle between each curve segment, then apply it in a for each loop so each segment is rotated by the total of all the previous segment angles, at the correct pivot point.



  • Like 4
  • Thanks 4

Share this post

Link to post
Share on other sites

Thanks, I will try to do this effect to rolls of different number of corners like hexagons etc

Share this post

Link to post
Share on other sites

c'mon, Matt, you're soooooooooooooooo close to completing this challenge....could almost reach the finish line now....


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now