I_dovelemon
Source: CSDN
Date: 2015/7/11
Subject: Interpolate,bezier Curve
IntroductionIn the game development. such as animation systems. path calculations, and so on, are subject to interpolation of numeric values.
Start today. will continue to introduce to you what is interpolation technology? And what interpolation techniques are often used in the development of computer video games. Interpolation Technology (Interpolate technology). Is by way of mathematical calculation. A technical scenario for smoothing the transition between two values.
This technique can be used in game content such as animation systems. Take an example of an animated system. Today's animation systems are mostly popular for a
Url=-3fh4jngijplber1rvzdei4idlyunu8lcyid7s25flxfym68ilvfsmmike8swjqyeif3asm6nkb7xwkdj63o-a "> Keyframe-based animations.
The artists are in some animation production software. such as Flash. Make the keyframes for the animation. The animation is then exported as a file.
This file only preserves the key moving parts of each animation.
So. When we use it in the game, we need to supplement the frame state data between each of the two keyframes by using a program. This technique, which constructs the median value by two values, is called the interpolation technique. This article will show you one of the most commonly used interpolation techniques of mathematical techniques. Its practical application will be presented to you in the chapter.
Bézier Curve Bézier Curve, which is a Bezier curve.
It is a generic term for some curve geometries. In this article, we will show you three kinds of Bézier Curve. Each is linear Bézier Curve, quadratic Bézier Curve, Cubic Bézier curv.
These three kinds of Bezier curve are commonly used curves. And each one is a curve. Two-and three-time curves. Other higher-dimensional curves will no longer be described. A specific explanation of the Bézier curve. We can see this wiki:bezier Curve.
Linear Bezier Curve a Bezier Curve, called the linear Bézier Curve, actually refers to a straight line. And no matter what the curvature. So. Techniques for interpolating using a Bezier curve. Also known as value linear interpolating (linear interpolation). Linear interpolation technology is widely used. In addition to being used in the animation system. The rasterization phase of 3D graphics is also used to interpolate vertex data and texture data. The formula for linear interpolation is given below:B (t) = P0 + (p1-p0) * t [0<=t <= 1] (1) T in the formula above. Represents a moment between P0 and P1. and B (t) is the state of the curve at this time. Because it is straight line, so this very easy to understand.
quadratic Bezier CurveThe formula for the two-time curve is deduced on the basis of a single curve. The Math derivation section is the same as can be found in the wiki above. The formula is given directly here:B (t) = (1-T) ^2 * p0 + 2 * (1-t) * t * p1 + t^2 * P2 (2)
Cubic Bezier CurveThe formula for the three-time curve is shown below:B (t) = (1-T) ^3 * p0 + 3 * (1-t) ^2 * t * p1 + 3 * (1-t) * t^2 * p2 + t^3 * P3 (3)
drawing Bézier Curve
<span style= "Font-family:microsoft Yahei;" >
Interpolation technology Bezier interpolation (1)--Bezier Curve