Bezier Curve and Its Application: Dušan Páleš, Jozef Rédl
Bezier Curve and Its Application: Dušan Páleš, Jozef Rédl
Bezier Curve and Its Application: Dušan Páleš, Jozef Rédl
Received: 2014-11-12
Accepted: 2015-02-06
Online published: 2015-11-16
DOI: http://dx.doi.org/10.15414/meraa.2015.01.02.49-55
Original paper
ABSTRACT
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.
Corresponding author: Dušan Páleš, Slovak University of Agriculture, Faculty of Engineering, Department of
Machine Design, Tr. A. Hlinku 2, 949 76 Nitra, Slovak Republic. E-mail: dusan.pales@uniag.sk
Mathematics in Education, Research and Applications (MERAA), ISSN 2453-6881
Math Educ Res Appl, 2015(1), 2
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)
The first approximation is obtained from the zero approximation using relations
Slovak University of Agriculture in Nitra :: Department of Mathematics, Faculty of Economics and Management :: 2015
50
Mathematics in Education, Research and Applications (MERAA), ISSN 2453-6881
Math Educ Res Appl, 2015(1), 2
The point of the third approximation P03 is the point of the curve for entered parameter value
t. This procedure should be repeated for each value t 0,1 . For t 0, P(0) P0 and for
t 1, P(1) P3 , therefore Bezier curve always passes through the first and the last point. If to
the relation (4) successively substitute relations (3), (2) and (1) we obtain the parametric
representation of the curve in the form
i 0 i
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
The process can be generalized to any number of control points of the polygon 4. When the
polygon has n 1 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
n
n
p (t ) 1 t t 1 P1
n i
(7)
i 1 1
Tangent of the curve obtained at point P(t) is directly determined by points P0n-1, P1n-1, in the
case of our four-point polygon (6) hence by points P02, P12. 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
n
n
p (t ) 1 t t 1 P1
n i
(8)
i 1 1
Slovak University of Agriculture in Nitra :: Department of Mathematics, Faculty of Economics and Management :: 2015
51
Mathematics in Education, Research and Applications (MERAA), ISSN 2453-6881
Math Educ Res Appl, 2015(1), 2
Bernstein polynomials form a basis of the vector space for polygon degree at most n. They are
i
unimodal (dromedary) functions with a single maximum at the point t . In Figure 2 we
n
present the Bernstein polynomials for n 9 .
For n 9 we chosen according to 2 ten points in the plane and developed an algorithm (10)
to calculate the Bezier curve with step parameter t 0.05 . 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.
Slovak University of Agriculture in Nitra :: Department of Mathematics, Faculty of Economics and Management :: 2015
52
Mathematics in Education, Research and Applications (MERAA), ISSN 2453-6881
Math Educ Res Appl, 2015(1), 2
Slovak University of Agriculture in Nitra :: Department of Mathematics, Faculty of Economics and Management :: 2015
53
Mathematics in Education, Research and Applications (MERAA), ISSN 2453-6881
Math Educ Res Appl, 2015(1), 2
Fig. 4 Original trajectory of vehicle from control points connected with lines
Source: Authors
CONCLUSIONS
The resulting registration of the algorithm (10) proved to be relatively simple, regardless of
the number of control points n and also of the parameter size tt of Bezier curve. Curve fitting
can be done in a plane and in space as shown in the presented examples. Practical application
of the real movement of the vehicle in space replaced polygon composed from line segments
by smooth Bezier curve, for which there are not discontinuous points of the first derivation.
Slovak University of Agriculture in Nitra :: Department of Mathematics, Faculty of Economics and Management :: 2015
54
Mathematics in Education, Research and Applications (MERAA), ISSN 2453-6881
Math Educ Res Appl, 2015(1), 2
ACKNOWLEDGEMENT
The research performed at the Department of Machine Design of the Faculty of Engineering
of the Slovak University of Agriculture in Nitra was supported by the Slovak Grant Agency
for Science under grant VEGA No. 1/0575/14 titled “Minimizing the risks of environmental
factors in animal production buildings”.
REFERENCES
[1] Bastl, B. Beziérove krivky. Plzeň: Západočeská univerzita v Plzni. [cit. 2014-12-18].
Retrieved from http://geometrie.kma.zcu.cz/index.php/www/content/download/1152/3264/
file/GPM_Bezier.pdf?PHPSESSID=05c59e8bf9cc6c31b703704908efa66e
[2] Macková, B. and Zaťková, V. (1985). Riešenie základných úloh z deskriptívnej geometrie
pomocou počítača. Bratislava: SVŠT Bratislava.
[3] Sederberg, T. W. (2012). Computer Aided Geometric Design Course Notes. Brigham
Young University, 262 p. [cit. 2014-12-18]. Retrieved from
http://cagd.cs.byu.edu/~557/text/cagd.pdf
[4] Shene, C. K. (2014). Introduction to Computing with Geometric Notes. Department of
Computer Science, Michigan Technological University. [cit. 2014-12-18]. Retrieved from
http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/
[5] Rédl J., Páleš D., Maga J., Kalácska G., Váliková V., Antl J. (2014). Technical Curve
Approximation. Mechanical engineering letters. Szent István University, Gödöllö.
Reviewed by
1 Milada Balková, Slovak University of Agriculture, Faculty of Engineering, Department of Buildings,
Tr. A. Hlinku 2, 949 76 Nitra, Slovak republic
2 Ingrid Karandušovská, Slovak University of Agriculture, Faculty of Engineering, Department of Buildings, Tr.
A. Hlinku 2, 949 76 Nitra, Slovak republic
Slovak University of Agriculture in Nitra :: Department of Mathematics, Faculty of Economics and Management :: 2015
55