Interpolation...

Started by
3 comments, last by Ekas78 23 years ago
Could anybody point me towards some nice info about interpolation? I''ve been trying to do cosinus interpolation..but all i end up with is segments with no continuity...Look kinda bad when applied to camera movement....
______________________________Only dead fish go with the main-stream.
Advertisement
Say you want to make the camera move from xi to xf in a time T.
The basic cosine interpolation scheme would be:

x=xi+(xf-xi)*(1-cos(PI*t/T))

Where t are the different times of the animation, and ranges form 0 to T. This simple eqn gives a smooth camera movement. Also it provides a slower movement at the start and in the end of the animation than in the middle, thus creating a really intersesting acceleration effect. Expanding it to 3D is really simple, just using the same formula for each independent component.
ops! I almost forget...

You can concatenate any number of animations using this basic formula without any discontinuity.

There are there other interesting interpolation schemes that could make cool effects, just take a look at trig, exp, bessel, ... functions, and use your imagination
ops! again...

The correct formula is:

x=xi+((xf-xi)/2)*(1-cos(PI*t/T))

just working without paper
Thanks!.. That camera is going to fly (like crazy) everywhere....(HEHE!)
/Ekas
______________________________Only dead fish go with the main-stream.

This topic is closed to new replies.

Advertisement