pendulum - with decay from www.motionscript.com

Moderators: Disciple, zlovatt

Post Reply
madli
Posts: 7
Joined: March 12th, 2007, 3:37 am

hi to all...im new here and new in ae expression as well.

but like to modify

Code: Select all

 freq = 1.0; //oscillations per second 
amplitude = 50; 
decay = 0.7;

amplitude*Math.sin(freq*time*2*Math.PI)/Math.exp(decay*time)
it seem the rotation start with 0.. but i want to start wit my degree value n to end wit other specific value...how can i do that? some can help me

i found this

Code: Select all

from = -45; //one end of your oscillation 
to = 45; //the other end of your oscillation 
period = 1.5; //time between oscillation points (multiply by 2 for a round trip) 
t = time % (period * 2) 
if (t > period) t = 2 * period - t; 
ease(t, 0, period, from, to)
but dunno to decay it? plz someone hustler! thankssss :D
Dan Ebberts
Posts: 320
Joined: June 26th, 2004, 10:01 am
Location: Folsom, CA
Contact:

Just change Math.sin to Math.cos and it will start at the amplitude value:

freq = 1.0; //oscillations per second
amplitude = 50;
decay = 0.7;

amplitude*Math.cos(freq*time*2*Math.PI)/Math.exp(decay*time)


Dan
madli
Posts: 7
Joined: March 12th, 2007, 3:37 am

thanks,

woo...thats is so simple..problem solved. :D thanks Dan
Post Reply