Bezier curve and its application

Description of the Bezier curve is presented. We explain in detail creation of the calculation algorithm together with the resulting program. It also includes drawing of the base functions of the Bernstein polynomials. Firstly, the procedure is applied to the theoretical example given by ten control points in a plane which approximate the Bezier curve. Secondly, the application in which we have given 138 points of trajectory of real vehicle. Points are located in space and we use them again for approximation of the smooth Bezier curve.


INTRODUCTION
The curves can be determined using control points, to which are usually added even further restrictions, such as boundary conditions.The control points are used either to interpolate the curve, when constructed smooth curve pass through all the given points, or to approximate curve when smooth curve pass only some selected control points or goes off these points 1.
Typical examples are the Lagrange interpolation, Hermite interpolation or Newton interpolation.The best known approximation method is the approximation method of the least squares.In this article we present approximation method using Bezier curve.

Bezier curve
Its name was given by French engineer Pierre Bezier, who worked at the French car factory Renault.A simple algorithm for creating Bezier curve constructed competitor's employee of Citroen Paul de Casteljau.Both designers have published their results in the sixties of the previous century 6.De Casteljau algorithm is based on the repeated use of linear interpolation and generalize the construction of parabolic curves for higher orders.Polygon was specified by four points in the plane as shown in the Figure 1 3.Similarly, we could have determined control points in space and the process would work analogously.
Bezier curve was expressed parametrically, the parameter t  0 , 1.Points of control polygon we denoted as 0-th approximation point of the curve (subscript represents the serial number of point and superscript approximation order) 0000 0 1 2 3 0 1 2 3 P , P , P , P P , P , P , P  The first approximation is obtained from the zero approximation using relations And analogous continue the second and third approximation The point of the third approximation P 0 3 is the point of the curve for entered parameter value t.This procedure should be repeated for each value The parameter t appears at most in the cube, so it is a cubic Bezier curve.Repeat the procedure creates a triangular approximation scheme of successive points 22 01 3 0 P P P P P P P P P P P PP P P(t)

Numerical example for many control points
The process can be generalized to any number of control points of the polygon 4.When the polygon has 1  n points it is necessary to perform n steps to get the point of the curve.Bezier curve of degree n in the parametric representation has the form Tangent of the curve obtained at point P(t) is directly determined by points P 0 n-1 , P 1 n-1 , in the case of our four-point polygon (6) hence by points P 0 2 , P 1 2 .The tangent at the starting point of the curve is the same as the first control edge of the polygon and in like manner tangent in the last point of the curve is identical to the last control edge of the polygon.

Formula
is called the Bernstein polynomial of degree n.
With it looks simply parametric writing of Bezier curve .
Bernstein polynomials form a basis of the vector space for polygon degree at most n.They are unimodal (dromedary) functions with a single maximum at the point n i t  .In Figure 2 we present the Bernstein polynomials for 9  n . .The number of points in the plane as well as the step parameter can vary.For planar curve we use an algorithm twice in both directions x and y.The selected control polygon and the resulting curve is shown in Figure 3.

Application of Beziér curve
The algorithm was used also in three dimensional space by application (10) in the directions x, y and z 5.We solved the real movement of the vehicle and record its position through 138 discrete points.These have served as control points for the Bezier curve.In Figure 4 we present a polygon, which was created by connecting points with line segments and Figure 5 shows the Bezier curve, which smoothed sequence of movement of the vehicle.