-
Dan Ebberts—questions regarding expressions from motionscript.com
First off I want to take the time to thank you for spending your time creating such a valuable learning tool & all of the help you give us javaphobes.
Finally decided to start exploring the power of java, but I’m a little confused by the mathematical order in this expression. Also have a quick secondary question
veloc = 40; //horizontal velocity (pixels per second)
amp =12; //sine wave amplitude (pixels)
freq = 2.4; //oscillations per secondx = time*veloc;
y = amp*time*(Math.sin(freq*time*2*Math.PI) – 1)/2 + thisComp.height/2;
[x,y]In the array here, “veloc = 40; //horizontal velocity (pixels per second)” Everything after the “;” are just notes correct?
y = amp*time*(Math.sin(freq*time*2*Math.PI) – 1)/2 + thisComp.height/2;
[x,y](freq*time*2*math.pi) is calculated first, then multiplied by Sin, then -1, /2
Thank you
Johnny Cuevas
Editor
Ck&Co