-
Math.sin – how to vary the speed smoothly
I am trying to animate a butterfly wing whereby (using the Math.sin function) I can get the wingbeats to speed up and then to slow down.
I am using this formula : Math.sin(time*thisComp.layer(“Null 1”).effect(“time_variable”)(“Slider”))*50 on the layers rotation property (in 3d)
the time_variable parameter links to a keyframed expression slider moving from 1 to 5 and then back down again.
Unfortunately somethings goes wierd in the maths and looking at the expression graph I can see that I am not just getting simple modulation from slow to fast and back again.
What happens is that the moment the speed from the expression slider starts to reduce (ie drop from 5 back down to 1) the speed jumps right down immediately with no transition.
see image below
