|
![](/i/fill.gif) |
Greg M. Johnson wrote:
> Did some tweaking with a way to get non-linear movement. I'd had one
> before, but when I actually plotted the curve, it was embarassing how
> little deviation from linearity there was.
>
> Now I've got it set up, perhaps too strongly, with a cos()^n, n<1 function.
> A buggy version of this code is release in my recent p.g. posting.
>
> So the point is to see to what extent the movement in the raising of the
> hand is like that of a real human, not that it's thematically releveant
> that a guy would be doing that.
I have this macro that I use in every animation:
#macro Transition(Start,End,Swerve,Phase)
#local tP=min(1,max(0,Phase))*pi;
#local aL=(1-cos(tP))/2;
#local aS=(1-cos(tP*2))/2;
( (Start)+(End-Start)*aL + (Swerve)*aS )
#end
This is quite good for most applications. Start and End are
self-explanatory. Swerve allows movement to the side at the mid-point
of the motion. Phase controls the timine of the motion, so for
animations you should put a clock-based value in here.
Hope this helps,
John
Post a reply to this message
|
![](/i/fill.gif) |