Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Bézier curve
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==General definition== Bézier curves can be defined for any degree ''n''. ===Recursive definition=== A recursive definition for the Bézier curve of degree ''n'' expresses it as a point-to-point [[linear combination]] ([[linear interpolation]]) of a pair of corresponding points in two Bézier curves of degree ''n'' − 1. Let <math>\mathbf{B}_{\mathbf{P}_0\mathbf{P}_1\ldots\mathbf{P}_k}</math> denote the Bézier curve determined by any selection of points '''P'''<sub>0</sub>, '''P'''<sub>1</sub>, ..., '''P'''<sub>''k''</sub>. Then to start, :<math>\mathbf{B}_{\mathbf{P}_0}(t) = \mathbf{P}_0 \text{, and}</math> :<math>\mathbf{B}(t) = \mathbf{B}_{\mathbf{P}_0\mathbf{P}_1\ldots\mathbf{P}_n}(t) = (1-t)\mathbf{B}_{\mathbf{P}_0\mathbf{P}_1\ldots\mathbf{P}_{n-1}}(t) + t\mathbf{B}_{\mathbf{P}_1\mathbf{P}_2\ldots\mathbf{P}_n}(t)</math> This recursion is elucidated in the [[#Constructing Bézier curves|animations below]]. ===Explicit definition=== The formula can be expressed explicitly as follows (where t<sup>0</sup> and (1-t)<sup>0</sup> are extended continuously to be 1 throughout [0,1]): :<math>\begin{align} \mathbf{B}(t) &= \sum_{i=0}^n {n\choose i}(1 - t)^{n - i}t^i\mathbf{P}_i \\ &=(1 - t)^n\mathbf{P}_0 + {n\choose 1}(1 - t)^{n - 1}t\mathbf{P}_1 + \cdots + {n\choose n - 1}(1 - t)t^{n - 1}\mathbf{P}_{n - 1} + t^n\mathbf{P}_n, && 0 \leqslant t \leqslant 1 \end{align}</math> where <math>\scriptstyle {n \choose i}</math> are the [[binomial coefficient]]s. For example, when ''n'' = 5: :<math>\begin{align} \mathbf{B}(t) &= (1 - t)^5\mathbf{P}_0 + 5t(1 - t)^4\mathbf{P}_1 + 10t^2(1 - t)^3 \mathbf{P}_2 + 10t^3 (1-t)^2 \mathbf{P}_3 + 5t^4(1-t) \mathbf{P}_4 + t^5 \mathbf{P}_5, && 0 \leqslant t \leqslant 1. \end{align}</math> ===Terminology=== Some terminology is associated with these parametric curves. We have :<math>\mathbf{B}(t) = \sum_{i=0}^n b_{i, n}(t)\mathbf{P}_i,\ \ \ 0 \le t \le 1</math> where the polynomials :<math>b_{i,n}(t) = {n \choose i} t^i (1 - t)^{n - i},\ \ \ i = 0, \ldots, n</math> are known as [[Bernstein polynomial|Bernstein basis polynomials]] of degree ''n''. ''t''<sup>0</sup> = 1, (1 − ''t'')<sup>0</sup> = 1, and the [[binomial coefficient]], <math>\scriptstyle {n \choose i}</math>, is: :<math>{n \choose i} = \frac{n!}{i!(n - i)!}.</math> The points '''P'''<sub>''i''</sub> are called ''control points'' for the Bézier curve. The [[polygon]] formed by connecting the Bézier points with [[line (mathematics)|lines]], starting with '''P'''<sub>0</sub> and finishing with '''P'''<sub>''n''</sub>, is called the ''Bézier polygon'' (or ''control polygon''). The [[convex hull]] of the Bézier polygon contains the Bézier curve. ===Polynomial form=== Sometimes it is desirable to express the Bézier curve as a [[polynomial]] instead of a sum of less straightforward [[Bernstein polynomial]]s. Application of the [[binomial theorem]] to the definition of the curve followed by some rearrangement will yield :<math>\mathbf{B}(t) = \sum_{j = 0}^n {t^j \mathbf{C}_j}</math> where :<math>\mathbf{C}_j = \frac{n!}{(n - j)!} \sum_{i = 0}^j \frac{(-1)^{i + j} \mathbf{P}_i}{i! (j - i)!} = \prod_{m = 0}^{j - 1} (n - m) \sum_{i = 0}^j \frac{(-1)^{i + j} \mathbf{P}_i}{i! (j - i)!}.</math> This could be practical if <math>\mathbf{C}_j</math> can be computed prior to many evaluations of <math>\mathbf{B}(t)</math>; however one should use caution as high order curves may lack [[numeric stability]] ([[de Casteljau's algorithm]] should be used if this occurs). Note that the [[empty product]] is 1. ===Properties=== [[File:quadratic_to_cubic_Bezier_curve.svg|thumb|upright|A cubic Bézier curve (yellow) can be made identical to a quadratic one (black) by <div style="margin-left:1em;text-indent:-1em">1. copying the end points, and</div> <div style="margin-left:1em;text-indent:-1em">2. placing its 2 middle control points (yellow circles) 2/3 along line segments from the end points to the quadratic curve's middle control point (black rectangle).</div>]] * The curve begins at <math>\mathbf P_0</math> and ends at <math>\mathbf P_n</math>; this is the so-called ''endpoint interpolation'' property. * The curve is a line [[if and only if]] all the control points are [[collinear]]. * The start and end of the curve is [[tangent]] to the first and last section of the Bézier polygon, respectively. * A curve can be split at any point into two subcurves, or into arbitrarily many subcurves, each of which is also a Bézier curve. * Some curves that seem simple, such as the [[circle]], cannot be described exactly by a Bézier or [[piecewise]] Bézier curve; though a four-piece cubic Bézier curve can approximate a circle (see [[composite Bézier curve]]), with a maximum radial error of less than one part in a thousand, when each inner control point (or offline point) is the distance <math>\textstyle\frac{4\left(\sqrt {2}-1\right)}{3}</math> horizontally or vertically from an outer control point on a unit circle. More generally, an ''n''-piece cubic Bézier curve can approximate a circle, when each inner control point is the distance <math>\textstyle\frac{4}{3}\tan(t/4)</math> from an outer control point on a unit circle, where <math display="inline">t = 2\pi/n</math> (i.e. <math>t=360^\circ/n</math>), and <math>n>2</math>. * Every quadratic Bézier curve is also a cubic Bézier curve, and more generally, every degree ''n'' Bézier curve is also a degree ''m'' curve for any ''m'' > ''n''. In detail, a degree ''n'' curve with control points <math>\mathbf{P}_0,\,\dots,\,\mathbf{P}_n</math> is equivalent (including the parametrization) to the degree ''n'' + 1 curve with control points <math>\mathbf{P}'_0,\,\dots,\,\mathbf {P}'_{n+1}</math>, where <math>\mathbf P'_k=\tfrac{k}{n+1}\mathbf P_{k-1}+\left(1-\tfrac{k}{n+1}\right)\mathbf P_k</math>, <math>\forall k = 0,\,1,\,\dots,\,n,\,n+1</math> and define <math>\mathbf{P}_{n+1} := \mathbf{P}_{0}</math>, <math>\mathbf{P}_{-1} := \mathbf{P}_{n}</math>. * Bézier curves have the [[variation diminishing property]]. What this means in intuitive terms is that a Bézier curve does not "undulate" more than the polygon of its control points, and may actually "undulate" less than that.<ref name="GonzalezDiaz-Herrera2014">{{cite book |author1=Teofilo Gonzalez |author1-link=Teofilo F. Gonzalez |author2=Jorge Diaz-Herrera |author3=Allen Tucker |title=Computing Handbook, Third Edition: Computer Science and Software Engineering |url=https://books.google.com/books?id=vMqSAwAAQBAJ&pg=SA32-PA14 |year=2014 |publisher=CRC Press |isbn=978-1-4398-9852-9 |at=page 32-14<!--this is a single page number-->}}</ref> * There is no [[local control]] in degree ''n'' Bézier curves—meaning that any change to a control point requires recalculation of and thus affects the aspect of the entire curve, "although the further that one is from the control point that was changed, the smaller is the change in the curve".<ref name="Agoston2005">{{cite book |author=Max K. Agoston |title=Computer Graphics and Geometric Modelling: Implementation & Algorithms |url=https://books.google.com/books?id=TAYw3LEs5rgC&pg=PA404 |year=2005 |publisher=Springer Science & Business Media |isbn=978-1-84628-108-2 |page=404}}</ref> * A Bézier curve of order higher than two may intersect itself or have a [[cusp (singularity)|cusp]] for certain choices of the control points. ===Second-order curve is a parabolic segment=== [[File:Quadratic_Bezier_parabola_equivalence.svg|thumb|upright|Equivalence of a quadratic Bézier curve and a parabolic segment]] A quadratic Bézier curve is also a segment of a [[parabola]]. As a parabola is a [[conic section]], some sources refer to quadratic Béziers as "conic arcs".<ref name=freetype/> With reference to the figure on the right, the important features of the parabola can be derived as follows:<ref>{{cite book |author=Duncan Marsh |title=Applied Geometry for Computer Graphics and CAD |series=Springer Undergraduate Mathematics Series |edition=2nd |date=2005 |isbn=978-1-85233-801-5 |id={{ASIN|1852338016|country=uk}}}}</ref> # Tangents to the parabola at the endpoints of the curve (A and B) intersect at its control point (C). # If D is the midpoint of AB, the tangent to the curve which is [[perpendicular]] to CD (dashed cyan line) defines its vertex (V). Its axis of symmetry (dash-dot cyan) passes through V and is perpendicular to the tangent. # E is either point on the curve with a tangent at 45° to CD (dashed green). If G is the intersection of this tangent and the axis, the line passing through G and perpendicular to CD is the directrix (solid green). # The focus (F) is at the intersection of the axis and a line passing through E and perpendicular to CD (dotted yellow). The latus rectum is the line segment within the curve (solid yellow). ===Derivative=== The derivative for a curve of order ''n'' is :<math>\mathbf{B}'(t) = n \sum_{i=0}^{n-1} b_{i,n-1}(t) (\mathbf{P}_{i+1} - \mathbf{P}_i).</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Bézier curve
(section)
Add topic