Bézier spline
|
|
Some or all of the formulas presented in this article have missing or incomplete descriptions of their variables, symbols or constants, which may create ambiguity or prevent full interpretation. Please assist in recruiting an expert or improve this article yourself. See the talk page for details. (August 2010) |
|
|
It has been suggested that beziergon be merged into this article or section. (Discuss) Proposed since July 2011. |
In the mathematical field of numerical analysis and in computer graphics, a Bézier spline is a spline curve where each polynomial of the spline is in Bézier form.
In other words, a Bézier spline is simply a series of Bézier curves joined end to end where the last point of one curve coincides with the starting point of the next curve. Usually cubic Bézier curves are used, and additional control points (called handles) are added to define the shape of each curve.
Contents |
[edit] Definition
Given a spline S of degree n with k knots xi we can write the spline as a Bézier spline as: ![S(x) := \left\{
\begin{matrix}
S_0(x) := & \sum_{\nu=0}^{n} \beta_{\nu,0} b_{\nu,n}(x) & x \in [x_0, x_1) \\
S_1(x) := & \sum_{\nu=0}^{n} \beta_{\nu,1} b_{\nu,n}(x - x_1) & x \in [x_1, x_2) \\
\vdots & \vdots \\
S_{k-2}(x) := & \sum_{\nu=0}^{n} \beta_{\nu,k-2} b_{\nu,n}(x - x_{k -2}) & x \in [x_{k-2}, x_{k-1}] \\
\end{matrix}\right.](http://upload.wikimedia.org/wikipedia/en/math/a/e/d/aed618e06f8f78567291370c3e739853.png)
[edit] Approximating circular arcs
In case circular arc primitives are not supported in a particular environment, they may be approximated by Bézier curves.[1] Commonly, four cubic segments are used to approximate a circle. It is desirable to find the length
of control points which result in the least approximation error.
[edit] Using four curves
Considering only the 90-degree unit-circular arc in the first quadrant, we define the endpoints
and
with control points
and
, respectively, as:
From the definition of the cubic Bézier curve, we have:
With the point
as the midpoint of the arc, we may write the following two equations:
Solving these equations for the x-coordinate (and identically for the y-coordinate) yields:
[edit] General case
We may compose a circle of radius R from an arbitrary number of cubic Bézier curves.[2] Let the arc start at point
and end at point
, placed at equal distances above and below the x-axis, spanning an arc of angle θ = 2ϕ:
The control points may be written as:[3]
[edit] Examples
[edit] References
- ^ Stanislav, G. Adam. "Drawing a circle with Bézier Curves". http://whizkidtech.redprince.net/bezier/circle/. Retrieved 10 April 2010.
- ^ Riškus, Aleksas (October 2006). "APPROXIMATION OF A CUBIC BEZIER CURVE BY CIRCULAR ARCS AND VICE VERSA". INFORMATION TECHNOLOGY AND CONTROL (Department of Multimedia Engineering, Kaunas University of Technology) 35 (4): 371–378. ISSN 1392-124X. http://itc.ktu.lt/itc354/Riskus354.pdf.
- ^ DeVeneza, Richard. "Drawing a circle with Bézier Curves". http://www.tinaja.com/glib/bezcirc2.pdf. Retrieved 10 April 2010.
![\begin{align}
\mathbf{A} & = [0, 1] \\
\mathbf{A'} & = [\mathbf{k}, 1] \\
\mathbf{B'} & = [1, \mathbf{k}] \\
\mathbf{B} & = [1, 0] \\
\end{align}](http://upload.wikimedia.org/wikipedia/en/math/b/e/c/bec3139fc8e8b56938a527e41daa06a7.png)





