.. _doc_interpolation: Interpolation ============= Interpolation is a very basic operation in graphics programming. It's good to become familiar with it in order to expand your horizons as a graphics developer. The basic idea is that you want to transition from A to B. A value `t`, represents the states in-between. As an example if `t` is 0, then the state is A. If `t` is 1, then the state is B. Anything in-between is an *interpolation*. Between two real (floating-point) numbers, a simple interpolation is usually described as: :: interpolation = A * (1 - t) + B * t And often simplified to: :: interpolation = A + (B - A) * t The name of this type of interpolation, which transforms a value into another at *constant speed* is *"linear"*. So, when you hear about *Linear Interpolation*, you know they are referring to this simple formula. There are other types of interpolations, which will not be covered here. A recommended read afterwards is the `Bezier