Sie sind auf Seite 1von 6

PPT BY - ABHISHEK BELOSHE

INTERPOLATION Sub - Game Programming


Class - T.Y. Comp Science
Roll No - 1909805
INTRODUCTION-
In the context of computer graphics, interpolation is in betweening, or filling in
frames between the key frames.
Interpolation is not a branch of mathematics but rather a collection of techniques the
reader will find useful when solving computer graphics problems.
Basically, an interpolant is a way of changing one number into another.
These numbers could then be used to translate, scale, rotate an object, move a virtual
camera, or change the position, colour or brightness of a virtual light source.
LINEAR INTERPOLATION-
A linear interpolant generates equal spacing between the interpolated values for equal
changes in the interpolating parameter.
Given two numbers n1 and n2, which represent the start and final values of the interpolant,
we require an interpolated value controlled by a parameter t that varies between 0 and 1.
When t = 0, the result is n1, and when t = 1, the result is n2.
A solution to this problem is given by:
n = n1 + t(n2 − n1)
Consider the task of moving an object between two locations (x1, y1, z1) and (x2, y2, z2).
The interpolated position is given by
x = x1(1 − t) + x2t
y = y1(1 − t) + y2t for 0 ≤ t ≤ 1
z = z1(1 − t) + z2t
NON-LINEAR INTERPOLATION-
When for some number of steps more interpolated values are needed to produce, then we use
non-linear interpolation.
This is achieved through various mathematic techniques such as trigonometric functions or
polynomials.
Trigonometric interpolation:
oWe know that 𝑠𝑖𝑛2 (β) + 𝑐𝑜𝑠 2 (β) = 1, which satisfies one of the requirements of an interpolant:
the terms must sum to 1.
o If β varies between 0 and π/2, 𝑐𝑜𝑠 2 (β) varies between 1 and 0, and 𝑠𝑖𝑛2 (β) varies between
0 and 1, which can be used to modify the two interpolated values n1 and n2 as follows:
n = n1 𝑐𝑜𝑠 2 (t) + n2 𝑠𝑖𝑛2 (t) for 0 ≤ t ≤ π/2
APPLICATIONS-
The path of an object can be interpolated by providing some key locations, then
calculating many in between locations for a smooth motion.
In addition to position, the speed or velocity, as well as accelerations along a path,
can be calculated to mimic real-life motion dynamics.
Where the subjects are too large or complex to move, the camera position and
orientation can be moved by this process.
Going further, orientations (rotations) of objects and parts of objects can be
interpolated as well as parts of complete characters(i.e. used in cartoon films).

Das könnte Ihnen auch gefallen