Talk:Linear Interpolation

From GPWiki

Files:GUITutorial_warn.gif The Game Programming Wiki has moved! Files:GUITutorial_warn.gif

The wiki is now hosted by GameDev.NET at wiki.gamedev.net. All gpwiki.org content has been moved to the new server.

However, the GPWiki forums are still active! Come say hello.

Uses of interpolation

It would be useful if the tutorial told us *how* linear interpolation is used in animation. Nothing too fancy, just a basic description. --IGTHORN 09:02, 23 Sep 2005 (EDT)

Use of Linear Interpolation

It's commonly used with motion in general.

Example:

There is an object which moves from point A to point B. In code you store the new position as B and the old position as A. But when you draw it you don't want your object to jump from A to B, instead you want it to gradually make its way there (motion). To do this you apply the linear interpolation equation:

Draw_Position = Last_Position + Percent * (New_Position - Last_Position)

Where Percent is how far conceptually you are into the next game logic tick. See [1] for more information.

--sdw 15:26, 23 Sep 2005 (EDT)