-
Help with note on motionscript.com
motionscript.com has a great expression for bouncing a ball that uses the cosine wave and the exponential curve.
freq = 1.0; //oscillations per second
amplitude = 90;
decay = .5;posCos = Math.abs(Math.cos(freq*time*2*Math.PI));
y = amplitude*posCos/Math.exp(decay*time);
position – [0,y]However there is a note about the frequency.
Note that you need to choose your frequency carefully to sell this effect. For example, at 30 frames per second, a frequency of 2.0 will cause the first bounce to occur half way between frames 3 and 4. So it will look like the ball never quite hits the “floor”. To have it occur exactly at frame 3, you would need to change your frequency to 2.5, and to make it occur at frame 4, you’d change the frequency to 1.875.
How are these new frequencies calculated using the composition framerate?
TONY T