ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Christmas tree spiral

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ben RobertsChristmas tree spiral
by on Oct 18, 2012 at 12:09:48 am

I'm trying to edit an expression which makes a perfect 3D Xmas tree spiral which a particle generator then follows.

I know this subject has come up before and I have tried to use some tips from this thread

http://forums.creativecow.net/thread/227/12276

However nothing looks as good as my first attempt.

So the current expression begins at the top of tree and builds outwards and downwards.

I need the expression to start at the bottom and build upwards and inwards.

Original Expression:

radius=-time*30
angle=-time*300;
x=radius*Math.cos(degreesToRadians(angle));
y=radius*Math.sin(degreesToRadians(angle));
z=time*50
center=[190,400,100];
add(center,[x,y,z]);


Any help/point in the right direction would be greatly appreciated.


Return to posts index

Dan EbbertsRe: Christmas tree spiral
by on Oct 18, 2012 at 1:30:21 am

If you're going to run it backwards, you need to pick a duration when the radius gets to zero. I've got it set 24 here:

maxTime = 24;

t = Math.min(time,maxTime);
radius = -(maxTime-t)*30
angle= -(maxTime-t)*300;
x=radius*Math.cos(degreesToRadians(angle));
y=radius*Math.sin(degreesToRadians(angle));
z=(maxTime-t)*50
center=[190,400,100];
add(center,[x,y,z]);

Dan



Return to posts index

Ben RobertsRe: Christmas tree spiral
by on Oct 18, 2012 at 2:10:53 am

That's it!

I'm very grateful for your help Dan.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 CreativeCOW.net All Rights Reserved
[TOP]