ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Re: Continuous bounce

COW Forums : Adobe After Effects Expressions

FAQ   •   VIEW ALL   •   ADD A NEW POST   •   PRINT
Respond to this post   •   Return to posts index   •   Read entire thread


Dan Ebberts
Re: Continuous bounce
on Jun 30, 2020 at 6:32:12 am

See what this version does for you:


freq = 0.5;
decay = 1;
val = value
n = 0;
if (numKeys > 0){
n = nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 1){
amp = velocityAtTime(key(n).time - .001);
w = freq*Math.PI*2;
for (i = 2; i <= n; i++){
t = Math.min(time - key(i).time,10/decay);
amp = velocityAtTime(key(i).time - .001);
val += amp*(Math.sin(t*w)/Math.exp(decay*t)/w);
}
}
val



Dan



Posts IndexRead Thread 


Current Message Thread:





© 2020 CreativeCOW.net All Rights Reserved
[TOP]