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
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!
{{Short description|Curve used in computer graphics and related fields}} [[File:Bezier curve.svg|thumb|right|Cubic Bézier curve with four control points]] [[File:Bezier basis.svg|thumb|right|The [[basis function]]s on the range {{nowrap|''t'' in [0,1]}} for cubic Bézier curves: {{nowrap|blue: ''y'' {{=}} (1 − ''t'')<sup>3</sup>}}, {{nowrap|green: ''y'' {{=}} 3(1 − ''t'')<sup>2</sup>''t''}}, {{nowrap|red: ''y'' {{=}} 3(1 − ''t'')''t''<sup>2</sup>}}, and {{nowrap|cyan: ''y'' {{=}} ''t''<sup>3</sup>}}.]] A '''Bézier curve''' ({{IPAc-en|'|b|E|z|.|i|.|ei}} {{Respell|BEH|zee|ay}},<ref>{{cite book |last=Wells |first=John |author-link = John C. Wells |title = Longman Pronunciation Dictionary |publisher=Pearson Longman |edition=3rd |date=3 April 2008 |isbn = 978-1-4058-8118-0 }}</ref> {{IPA|fr|bezje}}) is a [[parametric equation|parametric curve]] used in [[computer graphics]] and related fields.<ref name="Mortenson">{{cite book |url = https://books.google.com/books?id=YmQy799flPkC&pg=PA264 |page = 264 |title = Mathematics for Computer Graphics Applications |first = Michael E. |last = Mortenson |publisher=Industrial Press Inc. |year=1999 |isbn = 9780831131111 }}</ref> A set of discrete "control points" defines a smooth, continuous curve by means of a formula. Usually the curve is intended to approximate a real-world shape that otherwise has no mathematical representation or whose representation is unknown or too complicated. The Bézier curve is named after [[France|French]] engineer [[Pierre Bézier]] (1910–1999), who used it in the 1960s for designing curves for the bodywork of [[Renault]] cars.<ref name="Hazewinkel">{{cite book |url = https://books.google.com/books?id=3ndQH4mTzWQC&pg=PA119 |page = 119 |title = Encyclopaedia of Mathematics: Supplement |volume=1 |first = Michiel |last = Hazewinkel |publisher = Springer Science & Business Media |year=1997 |isbn = 9780792347095 }}</ref> Other uses include the design of computer [[font]]s and animation.<ref name="Hazewinkel" /> Bézier curves can be combined to form a [[Composite Bézier curve|Bézier spline]], or generalized to higher dimensions to form [[Bézier surface]]s.<ref name="Hazewinkel" /> The [[Bézier triangle]] is a special case of the latter. In [[vector graphics]], Bézier curves are used to model smooth curves that can be scaled indefinitely. "Paths", as they are commonly referred to in image manipulation programs,{{NoteTag|Image manipulation programs such as [[Inkscape]], [[Adobe Photoshop]], and [[GIMP]].}} are combinations of linked Bézier curves. Paths are not bound by the limits of [[raster graphics|rasterized]] images and are intuitive to modify. Bézier curves are also used in the time domain, particularly in [[animation]],<ref name=":0">{{Cite web|title=Cubic class - animation library - Dart API|url=https://api.flutter.dev/flutter/animation/Cubic-class.html|access-date=2021-04-26|website=api.flutter.dev}}</ref>{{NoteTag|In animation applications such as [[Adobe Flash]], [[Adobe After Effects]], [[Microsoft Expression Blend]], [[Blender (software)|Blender]], [[Autodesk Maya]] and [[Autodesk 3ds Max]].}} [[user interface]] design and smoothing cursor trajectory in eye gaze controlled interfaces.<ref>{{cite journal |title = Multimodal Intelligent Eye-Gaze Tracking System |journal = International Journal of Human-Computer Interaction |date=2015-04-03 |issn = 1044-7318 |pages=277–294 |volume=31 |issue=4 |doi=10.1080/10447318.2014.1001301 |first1=Pradipta |last1=Biswas |first2=Pat |last2=Langdon |s2cid = 36347027 }}</ref> For example, a Bézier curve can be used to specify the velocity over time of an object such as an icon moving from A to B, rather than simply moving at a fixed number of pixels per step. When animators or [[Graphical user interface|interface]] designers talk about the "physics" or "feel" of an operation, they may be referring to the particular Bézier curve used to control the velocity over time of the move in question. This also applies to robotics where the motion of a welding arm, for example, should be smooth to avoid unnecessary wear. ==Invention== The mathematical basis for Bézier curves—the [[Bernstein polynomial]]s—was established in 1912, but the [[polynomial]]s were not applied to graphics until some 50 years later when mathematician [[Paul de Casteljau]] in 1959 developed [[de Casteljau's algorithm]], a [[numerical stability|numerically stable]] method for evaluating the curves, and became the first to apply them to computer-aided design at French automaker [[Citroën]].<ref name="FarinHoschek2002">{{cite book |author1=Gerald E. Farin |author2=Josef Hoschek |author3=Myung-Soo Kim |title=Handbook of Computer Aided Geometric Design |url=https://books.google.com/books?id=0SV5G8fgxLoC&pg=PA4 |year=2002 |publisher=Elsevier |isbn=978-0-444-51104-1 |pages=4–6}}</ref> De Casteljau's method was patented in France but not published until the 1980s<ref name="deCasteljau1986">{{cite book |author=Paul de Casteljau|title=Mathématiques et CAO. Tome 2 : Formes à pôles|date=1986 |publisher=Hermès |isbn=9782866010423}}</ref> while the Bézier polynomials were widely publicised in the 1960s by the [[France|French]] engineer [[Pierre Bézier]], who discovered them independently and used them to design [[automobile]] bodies at [[Renault]]. ==Specific cases== A Bézier curve is defined by a [[set (mathematics)|set]] of ''[[Control point (mathematics)|control points]]'' '''P'''<sub>0</sub> through '''P'''<sub>''n''</sub>, where ''n'' is called the order of the curve (''n'' = 1 for linear, 2 for quadratic, 3 for cubic, etc.). The first and last control points are always the endpoints of the curve; however, the intermediate control points generally do not lie on the curve. The sums in the following sections are to be understood as [[Affine space#Affine combinations and barycenter|affine combinations]] – that is, the coefficients sum to 1. ===Linear Bézier curves=== Given distinct points '''P'''<sub>0</sub> and '''P'''<sub>1</sub>, a linear Bézier curve is simply a [[straight line|line]] between those two points. The curve is given by :<math>\mathbf{B}(t)=\mathbf{P}_0 + t(\mathbf{P}_1-\mathbf{P}_0)=(1-t)\mathbf{P}_0 + t\mathbf{P}_1,\ 0 \le t \le 1</math> This is the simplest and is equivalent to [[linear interpolation]].<ref>{{cite book |url=https://books.google.com/books?id=Wq7QEAAAQBAJ&pg=PA33 |page=33 |title= Stepping into Virtual Reality |author1=Mario A. Gutiérrez |author2=Frédéric Vexo |author3=Daniel Thalmann |publisher=Springer Nature |year=2023|isbn=9783031364877 }}</ref> The quantity <math>\mathbf{P}_1-\mathbf{P}_0</math> represents the [[displacement vector]] from the start point to the end point. ===Quadratic Bézier curves=== [[File:Quadratic Beziers in string art.svg|thumb|upright|Quadratic Béziers in [[string art]]: The end points ('''•''') and control point ('''×''') define the quadratic Bézier curve ('''⋯''').]] A quadratic Bézier curve is the path traced by the [[function (mathematics)|function]] '''B'''(''t''), given points '''P'''<sub>0</sub>, '''P'''<sub>1</sub>, and '''P'''<sub>2</sub>, : <math>\mathbf{B}(t) = (1 - t)[(1 - t) \mathbf P_0 + t \mathbf P_1] + t [(1 - t) \mathbf P_1 + t \mathbf P_2],\ 0 \le t \le 1</math>, which can be interpreted as the [[Linear interpolation|linear interpolant]] of corresponding points on the linear Bézier curves from '''P'''<sub>0</sub> to '''P'''<sub>1</sub> and from '''P'''<sub>1</sub> to '''P'''<sub>2</sub> respectively. Rearranging the preceding equation yields: : <math>\mathbf{B}(t) = (1 - t)^{2}\mathbf{P}_0 + 2(1 - t)t\mathbf{P}_1 + t^{2}\mathbf{P}_2,\ 0 \le t \le 1.</math> This can be written in a way that highlights the symmetry with respect to '''P'''<sub>1</sub>: : <math>\mathbf{B}(t) = \mathbf{P}_1+(1 - t)^{2}(\mathbf{P}_0 - \mathbf{P}_1) + t^{2}(\mathbf{P}_2-\mathbf{P}_1),\ 0 \le t \le 1.</math> Which immediately gives the [[derivative]] of the Bézier curve with respect to ''t'': : <math>\mathbf{B}'(t) = 2 (1 - t) (\mathbf{P}_1 - \mathbf{P}_0) + 2 t (\mathbf{P}_2 - \mathbf{P}_1),</math> from which it can be concluded that the [[tangent]]s to the curve at '''P'''<sub>0</sub> and '''P'''<sub>2</sub> intersect at '''P'''<sub>1</sub>. As ''t'' increases from 0 to 1, the curve departs from '''P'''<sub>0</sub> in the direction of '''P'''<sub>1</sub>, then bends to arrive at '''P'''<sub>2</sub> from the direction of '''P'''<sub>1</sub>. The second derivative of the Bézier curve with respect to ''t'' is : <math>\mathbf{B}''(t) = 2(\mathbf{P}_2 - 2 \mathbf{P}_1 + \mathbf{P}_0).</math> ===Cubic Bézier curves=== Four points '''P'''<sub>0</sub>, '''P'''<sub>1</sub>, '''P'''<sub>2</sub> and '''P'''<sub>3</sub> in the plane or in higher-dimensional space define a cubic Bézier curve. The curve starts at '''P'''<sub>0</sub> going toward '''P'''<sub>1</sub> and arrives at '''P'''<sub>3</sub> coming from the direction of '''P'''<sub>2</sub>. Usually, it will not pass through '''P'''<sub>1</sub> or '''P'''<sub>2</sub>; these points are only there to provide directional information. The distance between '''P'''<sub>1</sub> and '''P'''<sub>2</sub> determines "how far" and "how fast" the curve moves towards '''P'''<sub>1</sub> before turning towards '''P'''<sub>2</sub>. Writing '''B'''<sub>'''P'''<sub>''i''</sub>,'''P'''<sub>''j''</sub>,'''P'''<sub>''k''</sub></sub>(''t'') for the quadratic Bézier curve defined by points '''P'''<sub>''i''</sub>, '''P'''<sub>''j''</sub>, and '''P'''<sub>''k''</sub>, the cubic Bézier curve can be defined as an affine combination of two quadratic Bézier curves: :<math>\mathbf{B}(t) = (1-t)\mathbf{B}_{\mathbf P_0,\mathbf P_1,\mathbf P_2}(t) + t \mathbf{B}_{\mathbf P_1,\mathbf P_2,\mathbf P_3}(t),\ 0 \le t \le 1.</math> The explicit form of the curve is: :<math>\mathbf{B}(t) = (1-t)^3\mathbf{P}_0+3(1-t)^2t\mathbf{P}_1+3(1-t)t^2\mathbf{P}_2+t^3\mathbf{P}_3,\ 0 \le t \le 1.</math> For some choices of '''P'''<sub>1</sub> and '''P'''<sub>2</sub> the curve may intersect itself, or contain a [[Cusp (singularity)|cusp]]. Any series of 4 distinct points can be converted to a cubic Bézier curve that goes through all 4 points in order. Given the starting and ending point of some cubic Bézier curve, and the points along the curve corresponding to ''t'' = 1/3 and ''t'' = 2/3, the control points for the original Bézier curve can be recovered.<ref>{{cite web |author=John Burkardt |url-status=dead |archive-url=https://web.archive.org/web/20131225210855/http://people.sc.fsu.edu/~jburkardt/html/bezier_interpolation.html |url=http://people.sc.fsu.edu/~jburkardt/html/bezier_interpolation.html |title=Forcing Bezier Interpolation |archive-date=2013-12-25}}</ref> The derivative of the cubic Bézier curve with respect to ''t'' is : <math>\mathbf{B}'(t) = 3(1-t)^2(\mathbf{P}_1 - \mathbf{P}_0) + 6(1-t)t(\mathbf{P}_2 - \mathbf{P}_1) + 3t^2(\mathbf{P}_3 - \mathbf{P}_2) \,.</math> The second derivative of the Bézier curve with respect to ''t'' is : <math>\mathbf{B}''(t) = 6(1-t)(\mathbf{P}_2 - 2 \mathbf{P}_1 + \mathbf{P}_0) + 6t(\mathbf{P}_3 - 2 \mathbf{P}_2 + \mathbf{P}_1) \,.</math> ==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> ==Constructing Bézier curves== ===<span id="constructing-bezier-curves"></span>Linear curves=== Let ''t'' denote the fraction of progress (from 0 to 1) the point '''B'''(''t'') has made along its traversal from '''P'''<sub>0</sub> to '''P'''<sub>1</sub>. For example, when ''t''=0.25, '''B'''(''t'') is one quarter of the way from point '''P'''<sub>0</sub> to '''P'''<sub>1</sub>. As ''t'' varies from 0 to 1, '''B'''(''t'') draws a line from '''P'''<sub>0</sub> to '''P'''<sub>1</sub>. {| style="margin:1em auto; text-align:center; float:none; clear:both; font-size:95%; vertical-align:top;" |- | style="border-bottom:1px solid #222;"|[[File:Bézier 1 big.gif|240px|Animation of a linear Bézier curve, ''t'' in [0,1]]] |- |Animation of a linear Bézier curve, ''t'' in [0,1] |} ===Quadratic curves=== For quadratic Bézier curves one can construct intermediate points '''Q'''<sub>0</sub> and '''Q'''<sub>1</sub> such that as ''t'' varies from 0 to 1: * Point '''Q'''<sub>0</sub>(''t'') varies from '''P'''<sub>0</sub> to '''P'''<sub>1</sub> and describes a linear Bézier curve. * Point '''Q'''<sub>1</sub>(''t'') varies from '''P'''<sub>1</sub> to '''P'''<sub>2</sub> and describes a linear Bézier curve. * Point '''B'''(''t'') is interpolated linearly between '''Q'''<sub>0</sub>(''t'') to '''Q'''<sub>1</sub>(''t'') and describes a quadratic Bézier curve. {| style="margin:1em auto; text-align:center; float:none; clear:both; font-size:95%; vertical-align:top;" |- | style="border-bottom:1px solid #2f2;"|[[File:Bézier 2 big.svg|240px|Construction of a quadratic Bézier curve]]|| | style="border-bottom:1px solid #2f2;"|[[File:Bézier 2 big.gif|240px|Animation of a quadratic Bézier curve, ''t'' in [0,1]]] |- |Construction of a quadratic Bézier curve|| |Animation of a quadratic Bézier curve, ''t'' in [0,1] |} ===Higher-order curves=== For higher-order curves one needs correspondingly more intermediate points. For cubic curves one can construct intermediate points '''Q'''<sub>0</sub>, '''Q'''<sub>1</sub>, and '''Q'''<sub>2</sub> that describe linear Bézier curves, and points '''R'''<sub>0</sub> and '''R'''<sub>1</sub> that describe quadratic Bézier curves: {| style="margin:1em auto; text-align:center; float:none; clear:both; font-size:95%; vertical-align:top;" |- | style="border-bottom:1px solid #22f;"|[[File:Bézier 3 big.svg|240px|Construction of a cubic Bézier curve]]|| | style="border-bottom:1px solid #22f;"|[[File:Bézier 3 big.gif|240px|Animation of a cubic Bézier curve, ''t'' in [0,1]]] |- |Construction of a cubic Bézier curve|| |Animation of a cubic Bézier curve, ''t'' in [0,1] |} For fourth-order curves one can construct intermediate points '''Q'''<sub>0</sub>, '''Q'''<sub>1</sub>, '''Q'''<sub>2</sub> and '''Q'''<sub>3</sub> that describe linear Bézier curves, points '''R'''<sub>0</sub>, '''R'''<sub>1</sub> and '''R'''<sub>2</sub> that describe quadratic Bézier curves, and points '''S'''<sub>0</sub> and '''S'''<sub>1</sub> that describe cubic Bézier curves: {| style="margin:1em auto; text-align:center; float:none; clear:both; font-size:95%; vertical-align:top;" |- | style="border-bottom:1px solid #f2f;"|[[File:Bézier 4 big.svg|240px|Construction of a quartic Bézier curve]]|| | style="border-bottom:1px solid #f2f;"|[[File:Bézier 4 big.gif|240px|Animation of a quartic Bézier curve, ''t'' in [0,1]]] |- |Construction of a quartic Bézier curve|| |Animation of a quartic Bézier curve, ''t'' in [0,1] |} For fifth-order curves, one can construct similar intermediate points. {| style="margin:1em auto; text-align:center; float:none; clear:both; font-size:95%; vertical-align:top;" |- |style="border-bottom: 1px solid silver"|[[File:BezierCurve.gif|240px|Animation of the construction of a fifth-order Bézier curve]] |- |Animation of a fifth-order Bézier curve, ''t'' in [0,1] in red. The Bézier curves for each of the lower orders are also shown. |} These representations rest on the process used in [[De Casteljau's algorithm]] to calculate Bézier curves.<ref>{{cite web |last=Shene |first=C. K. |title=Finding a Point on a Bézier Curve: De Casteljau's Algorithm |url=http://www.cs.mtu.edu/~shene/COURSES/cs3621/NOTES/spline/Bezier/de-casteljau.html |access-date=6 September 2012}}</ref> ===Offsets (or stroking) of Bézier curves=== The curve at a fixed offset from a given Bézier curve, called an [[parallel curve|offset or parallel curve]] in mathematics (lying "parallel" to the original curve, like the offset between rails in a [[railroad track]]), cannot be exactly formed by a Bézier curve (except in some trivial cases). In general, the two-sided offset curve of a cubic Bézier is a 10th-order [[algebraic curve]]<ref name="Kilgard">{{cite web |author=Mark Kilgard |date=April 10, 2012 |title=CS 354 Vector Graphics & Path Rendering |url=http://www.slideshare.net/Mark_Kilgard/22pathrender |page=28}}</ref> and more generally for a Bézier of degree ''n'' the two-sided offset curve is an algebraic curve of degree 4''n'' − 2.<ref>{{cite web |title=Introduction to Pythagorean-hodograph curves |author=Rida T. Farouki |url=http://faculty.engineering.ucdavis.edu/farouki/wp-content/uploads/sites/41/2013/02/Introduction-to-PH-curves.pdf |archive-url=https://web.archive.org/web/20150605214546/http://faculty.engineering.ucdavis.edu/farouki/wp-content/uploads/sites/41/2013/02/Introduction-to-PH-curves.pdf |url-status=dead |archive-date=June 5, 2015 }}, particularly p. 16 "taxonomy of offset curves".</ref> However, there are [[heuristic]] methods that usually give an adequate approximation for practical purposes.<ref>For example: * {{cite book |last1=Ostromoukhov |first1=Victor |title=Hermite Approximation for Offset Curve Computation |url=https://perso.liris.cnrs.fr/victor.ostromoukhov/publications/pdf/ICCG93_Hermite.pdf|citeseerx=10.1.1.43.1724 |language=en}} * {{cite web |last1=Kilgard |first1=Mark J. |last2=Moreton |first2=Henry Packard |title=US20110285719A1 Approximation of stroked higher-order curved segments by quadratic bèzier curve segments |url=https://patents.google.com/patent/US20110285719 |website=Google Patents |date=24 November 2011}} For a survey see {{cite journal |last1=Elber |first1=G. |title=Comparing offset curve approximation methods |journal=IEEE Computer Graphics and Applications |date=May 1997 |volume=17 |issue=3 |pages=62–71 |doi=10.1109/38.586019|url=http://3map.snu.ac.kr/mskim/ftp/comparing.pdf}}</ref> In the field of [[vector graphics]], painting two symmetrically distanced offset curves is called ''stroking'' (the Bézier curve or in general a path of several Bézier segments).<ref name="Kilgard"/> The conversion from offset curves to filled Bézier contours is of practical importance in converting [[font]]s defined in [[Metafont]], which require stroking of Bézier curves, to the more widely used [[PostScript fonts|PostScript type 1 font]]s, which only require (for efficiency purposes) the mathematically simpler operation of filling a contour defined by (non-self-intersecting) Bézier curves.<ref>{{cite journal |url=https://www.tug.org/TUGboat/tb16-3/tb48kinc.pdf |archive-url=https://ghostarchive.org/archive/20221009/https://www.tug.org/TUGboat/tb16-3/tb48kinc.pdf |archive-date=2022-10-09 |url-status=live |title=MetaFog: Converting Metafont shapes to contours |author=Richard J. Kinch |date=1995 |journal=TUGboat |volume=16 |issue=3–Proceedings of the 1995 Annual Meeting}}</ref> ==Degree elevation== A Bézier curve of degree ''n'' can be converted into a Bézier curve of degree ''n'' + 1 ''with the same shape''. This is useful if software supports Bézier curves only of specific degree. For example, systems that can only work with cubic Bézier curves can implicitly work with quadratic curves by using their equivalent cubic representation. To do degree elevation, we use the equality <math>\mathbf{B}(t) = (1-t)\mathbf{B}(t) + t\mathbf{B}(t).</math> Each component <math>\mathbf{b}_{i,n}(t)\mathbf{P}_i</math> is multiplied by (1 − ''t'') and ''t'', thus increasing a degree by one, without changing the value. Here is the example of increasing degree from 2 to 3. :<math>\begin{align} (1 - t)^2 \mathbf{P}_0 + 2(1 - t)t\mathbf{P}_1 + t^2 \mathbf{P}_2 &= (1 - t)^3 \mathbf{P}_0 + 2(1 - t)^2 t\mathbf{P}_1 + (1 - t)t^2 \mathbf{P}_2 + (1 - t)^{2}t\mathbf{P}_0 + 2(1 - t)t^2 \mathbf{P}_1 + t^3 \mathbf{P}_2 \\ &= (1 - t)^3 \mathbf{P}_0 + (1 - t)^2 t \left( \mathbf{P}_0 + 2\mathbf{P}_1\right) + (1 - t) t^2 \left(2\mathbf{P}_1 + \mathbf{P}_2\right) + t^{3}\mathbf{P}_2 \\ &= (1 - t)^3 \mathbf{P}_0 + 3(1 - t)^2 t \tfrac{1}{3} \left( \mathbf{P}_0 + 2\mathbf{P}_1 \right) + 3(1 - t) t^2 \tfrac{1}{3} \left( 2\mathbf{P}_1 + \mathbf{P}_2 \right) + t^{3}\mathbf{P}_2 \end{align}</math> In other words, the original start and end points are unchanged. The new control points are <math>\mathbf{P'}_1 = \tfrac{1}{3} \left( \mathbf{P}_0 + 2\mathbf{P}_1 \right)</math> and <math>\mathbf{P'}_2 = \tfrac{1}{3} \left( 2\mathbf{P}_1 + \mathbf{P}_2 \right)</math>. For arbitrary ''n'' we use equalities<ref name="farin1997"/> :<math>\begin{cases} {n + 1 \choose i}(1 - t)\mathbf{b}_{i, n} = {n \choose i} \mathbf{b}_{i, n + 1} \\ {n + 1 \choose i + 1} t\mathbf{b}_{i, n} = {n \choose i} \mathbf{b}_{i + 1, n + 1} \end{cases} \quad \implies \quad \begin{cases} (1 - t)\mathbf{b}_{i, n} = \frac{n + 1 - i}{n + 1} \mathbf{b}_{i, n + 1} \\ t\mathbf{b}_{i, n} = \frac{i + 1}{n + 1} \mathbf{b}_{i + 1, n + 1} \end{cases} </math> Therefore: :<math>\begin{align} \mathbf{B}(t) &= (1 - t)\sum_{i=0}^n \mathbf{b}_{i, n}(t)\mathbf{P}_i + t\sum_{i=0}^n \mathbf{b}_{i, n}(t)\mathbf{P}_i \\ &= \sum_{i=0}^n \frac{n + 1 - i}{n + 1}\mathbf{b}_{i, n + 1}(t)\mathbf{P}_i + \sum_{i=0}^n \frac{i + 1}{n + 1}\mathbf{b}_{i + 1, n + 1}(t)\mathbf{P}_i \\ &= \sum_{i=0}^{n + 1} \left(\frac{i}{n + 1}\mathbf{P}_{i - 1} + \frac{n + 1 - i}{n + 1}\mathbf{P}_i\right) \mathbf{b}_{i, n + 1}(t) \\ &= \sum_{i=0}^{n + 1} \mathbf{b}_{i, n + 1}(t)\mathbf{P'}_i \end{align}</math> introducing arbitrary <math>\mathbf{P}_{-1}</math> and <math>\mathbf{P}_{n + 1}</math>. Therefore, new control points are<ref name="farin1997">{{cite book |title=Curves and surfaces for computer-aided geometric design |first=Gerald |last=Farin |publisher=[[Elsevier]] Science & Technology Books |year=1997 |isbn=978-0-12-249054-5 |edition=4}}</ref> : <math>\mathbf{P'}_i = \frac{i}{n + 1}\mathbf{P}_{i - 1} + \frac{n + 1 - i}{n + 1}\mathbf{P}_i,\quad i=0, \ldots, n + 1.</math> ===Repeated degree elevation=== The concept of degree elevation can be repeated on a control polygon '''R''' to get a sequence of control polygons '''R''', '''R'''<sub>1</sub>, '''R'''<sub>2</sub>, and so on. After ''r'' degree elevations, the polygon '''R'''<sub>''r''</sub> has the vertices '''P'''<sub>0,''r''</sub>, '''P'''<sub>1,''r''</sub>, '''P'''<sub>2,''r''</sub>, ..., '''P'''<sub>''n''+''r'',''r''</sub> given by <ref name="farin1997"/> :<math>\mathbf{P}_{i,r} = \sum_{j=0}^n \mathbf{P}_j \tbinom nj \frac{\tbinom{r}{i-j}}{\tbinom{n+r}{i}}.</math> It can also be shown that for the underlying Bézier curve ''B'', :<math>\mathbf{\lim_{r \to \infty}R_r} = \mathbf{B}.</math> ===Degree reduction=== Degree reduction can only be done exactly when the curve in question is originally elevated from a lower degree.<ref name="ffbezier">{{cite web |title=Bézier Splines |url=https://fontforge.org/docs/techref/bezier.html |website=FontForge 20230101 documentation}}</ref> A number of approximation algorithms have been proposed and used in practice.<ref>{{cite journal |last1=Eck |first1=Matthias |title=Degree reduction of Bézier curves |journal=Computer Aided Geometric Design |date=August 1993 |volume=10 |issue=3–4 |pages=237–251 |doi=10.1016/0167-8396(93)90039-6}}</ref><ref>{{cite conference |last1=Rababah |first1=Abedallah |last2=Ibrahim |first2=Salisu |chapter=Geometric Degree Reduction of Bézier Curves |title=Mathematics and Computing |conference=ICMC 2018, Varanasi, India |date=2018 |pages=87–95 |doi=10.1007/978-981-13-2095-8_8 |isbn=978-981-13-2094-1 }}</ref> ==Rational Bézier curves== [[Image:Rational Bezier curve-conic sections.svg|thumb|Segments of conic sections represented exactly by rational Bézier curves]] The rational Bézier curve adds adjustable weights to provide closer approximations to arbitrary shapes. The numerator is a weighted Bernstein-form Bézier curve and the denominator is a weighted sum of [[Bernstein polynomial]]s. Rational Bézier curves can, among other uses, be used to represent segments of [[conic section]]s exactly, including circular arcs.<ref>{{cite web |url=http://www.cl.cam.ac.uk/teaching/2000/AGraphHCI/SMEG/node5.html |title=Some Mathematical Elements of Graphics: Rational B-splines |author=Neil Dodgson |date=2000-09-25 |access-date=2009-02-23}}</ref> Given ''n'' + 1 control points '''P'''<sub>0</sub>, ..., '''P'''<sub>''n''</sub>, the rational Bézier curve can be described by :<math>\mathbf{B}(t) = \frac{ \sum_{i=0}^n b_{i,n}(t) \mathbf{P}_{i}w_i } { \sum_{i=0}^n b_{i,n}(t) w_i },</math> or simply :<math>\mathbf{B}(t) = \frac{ \sum_{i=0}^n {n \choose i} t^i (1-t)^{n-i}\mathbf{P}_{i}w_i } { \sum_{i=0}^n {n \choose i} t^i (1-t)^{n-i}w_i }.</math> The expression can be extended by using number systems besides [[real number|reals]] for the weights. In the [[complex plane]] the points {1}, {-1}, and {1} with weights {<math>i</math>}, {1}, and {<math>-i</math>} generate a full circle with radius one. For curves with points and weights on a circle, the weights can be scaled without changing the curve's shape.<ref>{{ cite journal |author= J. Sánchez-Reyes |journal=Computer Aided Geometric Design |volume=26 |issue=8 |date=November 2009|pages=865–876 | title=Complex rational Bézier curves |doi=10.1016/j.cagd.2009.06.003 }}</ref> Scaling the central weight of the above curve by 1.35508 gives a more uniform parameterization. ==Applications== ===Computer graphics=== [[Image:Bézier curve in Adobe Illustrator CS2.png|left|thumb|Bézier path in [[Adobe Illustrator]] ]] Bézier curves are widely used in computer graphics to model smooth curves. As the curve is completely contained in the [[convex hull]] of its [[Control point (mathematics)|control points]], the points can be graphically displayed and used to manipulate the curve intuitively. [[Affine transformation]]s such as [[translation (geometry)|translation]] and [[rotation]] can be applied on the curve by applying the respective transform on the control points of the curve. [[Quadratic function|Quadratic]] and [[Cubic function|cubic]] Bézier curves are most common. Higher degree curves are more [[computationally expensive]] to evaluate. When more complex shapes are needed, low order Bézier curves are patched together, producing a [[composite Bézier curve]]. A composite Bézier curve is commonly referred to as a "path" in [[vector graphics]] languages (like [[PostScript]]), vector graphics standards (like [[Scalable vector graphics|SVG]]) and vector graphics programs (like [[Artline (program)|Artline]]<!-- 1990 -->, [[Timeworks Publisher]]<!-- early 1990s -->, [[Adobe Illustrator]], [[CorelDraw]], [[Inkscape]], and [[Allegro (software library)|Allegro]]). In order to join Bézier curves into a composite Bézier curve without kinks, a property called [[Smoothness#Geometric continuity|''G1 continuity'']] suffices to force the control point at which two constituent Bézier curves meet to lie on the line defined by the two control points on either side. [[File:Bezier curves composition ray-traced in 3D.png|thumb|Abstract composition of cubic Bézier curves ray-traced in 3D. Ray intersection with swept volumes along curves is calculated with Phantom Ray-Hair Intersector algorithm.<ref>Alexander Reshetov and David Luebke, Phantom Ray-Hair Intersector. In Proceedings of the ACM on Computer Graphics and Interactive Techniques (August 1, 2018). [https://research.nvidia.com/publication/2018-08_Phantom-Ray-Hair-Intersector]</ref>]] The simplest method for scan converting ([[Rasterisation|rasterizing]]) a Bézier curve is to evaluate it at many closely spaced points and scan convert the approximating sequence of line segments. However, this does not guarantee that the rasterized output looks sufficiently smooth, because the points may be spaced too far apart. Conversely it may generate too many points in areas where the curve is close to linear. A common adaptive method is recursive subdivision, in which a curve's control points are checked to see if the curve approximates a line to within a small tolerance. If not, the curve is subdivided parametrically into two segments, 0 ≤ ''t'' ≤ 0.5 and 0.5 ≤ ''t'' ≤ 1, and the same procedure is applied recursively to each half. There are also forward differencing methods, but great care must be taken to analyse error propagation.<ref name="Xuexiang"/> Analytical methods where a Bézier is intersected with each scan line involve finding [[zero of a function|roots]] of cubic polynomials (for cubic Béziers) and dealing with multiple roots, so they are not often used in practice.<ref name="Xuexiang">{{cite web |title=Complex Quadratic Bézier Curve on Unit Circle |author1=Xuexiang Li |name-list-style=amp |author2=Junxiao Xue |publisher=School of Software, Zhengzhou University |location=Zhengzhou, China |url=https://www.atlantis-press.com/php/download_paper.php?id=12403}}</ref> The rasterisation algorithm used in [[Metafont]] is based on discretising the curve, so that it is approximated by a sequence of "[[rook (chess)|rook]] moves" that are purely vertical or purely horizontal, along the pixel boundaries. To that end, the plane is first split into eight 45° sectors (by the coordinate axes and the two lines <math> y = \pm x </math>), then the curve is decomposed into smaller segments such that the ''direction'' of a curve segment stays within one sector; since the curve velocity is a second degree polynomial, finding the <math>t</math> values where it is parallel to one of these lines can be done by solving [[quadratic equation]]s. Within each segment, either horizontal or vertical movement dominates, and the total number of steps in either direction can be read off from the endpoint coordinates; in for example the 0–45° sector horizontal movement to the right dominates, so it only remains to decide between which steps to the right the curve should make a step up.<ref>Parts 19–22 of {{cite book |last1=Knuth |first1=Donald E. |author-link=Donald Knuth |title=Metafont: The Program |date=1986 |publisher=Addison-Wesley |isbn=0-201-13438-1}}</ref> There is also a modified curve form of [[Bresenham's line algorithm|Bresenham's line drawing algorithm]] by Zingl that performs this rasterization by subdividing the curve into rational pieces and calculating the error at each pixel location such that it either travels at a 45° angle or straight depending on compounding error as it iterates through the curve. This reduces the next step calculation to a series of [[integer]] additions and subtractions.<ref name=Zingl>{{cite report|last=Zingl|first=Alois|title=A Rasterizing Algorithm for Drawing Curves|year=2012|url=http://members.chello.at/~easyfilter/Bresenham.pdf}}<br>HTML abstract and demo: {{cite web |date=2016|last=Zingl|first=Alois|title=Bresenham |url=http://members.chello.at/easyfilter/bresenham.html |website=members.chello.at}}</ref> ===Animation=== In animation applications, such as [[Adobe Flash]] and [[Synfig]], Bézier curves are used to outline, for example, movement. Users outline the wanted path in Bézier curves, and the application creates the needed frames for the object to move along the path.<ref>{{cite web |url=https://www.adobe.com/devnet/flash/learning_guide/animation/part07.html |title=Using motion paths in animations |website=Adobe |access-date=2019-04-11}}</ref><ref>{{cite web |url=https://wiki.synfig.org/Doc:Following_a_Spline |title=Following a Spline |website=Synfig Wiki |access-date=2019-04-11}}</ref> In 3D animation, Bézier curves are often used to define 3D paths as well as 2D curves for keyframe interpolation.<ref>{{cite web |title=Advanced Graphics Lecture Notes|publisher=University of Cambridge Computer Laboratory|first=Neil A.|last=Dodgson |url=https://www.cl.cam.ac.uk/teaching/1213/AdvGraph/smeg13.pdf |archive-url=https://ghostarchive.org/archive/20221009/https://www.cl.cam.ac.uk/teaching/1213/AdvGraph/smeg13.pdf |archive-date=2022-10-09 |url-status=live|website=cl.cam.ac.uk|date=1999}}</ref> Bézier curves are now very frequently used to control the animation easing in [[CSS]], [[JavaScript]], [[JavaFx]] and [[Flutter (software)|Flutter SDK]].<ref name=":0" /> ===Fonts=== [[TrueType]] fonts use composite Bézier curves composed of '''quadratic''' Bézier curves. Other languages and imaging tools (such as [[PostScript]], [[Asymptote (vector graphics language)|Asymptote]], [[Metafont]], and [[Scalable vector graphics|SVG]]) use composite Béziers composed of '''cubic''' Bézier curves for drawing curved shapes. [[OpenType]] fonts can use either kind of curve, depending on which font technology underlies the OpenType wrapper.<ref>{{cite web |title=The difference between CFF and TTF |url=https://www.linotype.com/8120/the-difference-between-cff-and-ttf.html |archive-url=https://web.archive.org/web/20170703232935/https://www.linotype.com/8120/the-difference-between-cff-and-ttf.html |archive-date=2017-07-03 |website=Know How |publisher=Linotype |access-date=3 July 2018 |ref=CFF_TTF |quote=The OpenType format was formulated in 1996. By 2003, it began to replace two competing formats: the Type1 fonts, developed by Adobe and based on [P]ost[S]cript, and the TrueType fonts, specified by Microsoft and Apple. (...) TTF stands for TrueTypeFont and indicates that the font data is the same as in the TrueType fonts. CFF stands for the Type1 font format. Strictly speaking, it refers to the Compact Font Format, which is used in the compression processes for the Type2 fonts. (...) the cubic Bézier format of the Type1 fonts is more space-saving compared to the quadratic format of the TrueType fonts. Some kilobytes can be saved in large, elaborate fonts which may represent an advantage on the Web. On the other hand, the more detailed hinting information of the TrueType fonts is useful for very extensive optimization for screen use.}}</ref> Font engines, like [[FreeType]], draw the font's curves (and lines) on a pixellated surface using a process known as [[font rasterization]].<ref name=freetype>{{cite web |title=FreeType Glyph Conventions / VI. FreeType outlines |website=The Free Type Project |date=13 February 2018 |url=http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html}}<br>{{cite web |title=FreeType Glyph Conventions – Version 2.1 / VI. FreeType outlines |date=6 March 2011 |url=http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html |archive-url=https://web.archive.org/web/20110929201958/http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html |url-status=dead |archive-date=2011-09-29}}</ref> Typically font engines and vector graphics engines render Bézier curves by splitting them recursively up to the point where the curve is flat enough to be drawn as a series of linear or circular segments. The exact splitting algorithm is implementation dependent, only the flatness criteria must be respected to reach the necessary precision and to avoid non-monotonic local changes of curvature. The "smooth curve" feature of charts in [[Microsoft Excel]] also uses this algorithm.<ref>{{cite web |url=http://www.xlrotor.com/resources/files.shtml |title=smooth_curve_bezier_example_file.xls |website=Rotating Machinery Analysis, Inc. |access-date=2011-02-05 |url-status=dead |archive-url=https://web.archive.org/web/20110718131613/http://www.xlrotor.com/resources/files.shtml |archive-date=2011-07-18 }}</ref> Because arcs of circles and [[ellipse]]s cannot be exactly represented by Bézier curves, they are first approximated by Bézier curves, which are in turn approximated by arcs of circles. This is inefficient as there exists also approximations of all Bézier curves using arcs of circles or ellipses, which can be rendered incrementally with arbitrary precision. Another approach, used by modern hardware graphics adapters with accelerated geometry, can convert exactly all Bézier and conic curves (or surfaces) into [[non-uniform rational B-spline|NURBS]], that can be rendered incrementally without first splitting the curve recursively to reach the necessary flatness condition. This approach also preserves the curve definition under all linear or perspective 2D and 3D transforms and projections.{{citation needed|date=October 2015}} ===Robotics=== Because the control polygon allows to tell whether or not the path collides with any obstacles, Bézier curves are used in producing trajectories of the [[end effector]]s.<ref name=Malik2021>{{cite journal|last1=Malik|first1=Aryslan|last2=Henderson|first2=Troy|last3=Prazenica|first3=Richard|title=Trajectory Generation for a Multibody Robotic System using the Product of Exponentials Formulation|journal=AIAA Scitech 2021 Forum|date=January 2021|pages=2016|doi=10.2514/6.2021-2016|isbn=978-1-62410-609-5 |s2cid=234251587 |url=https://arc.aiaa.org/doi/abs/10.2514/6.2021-2016}}</ref> Furthermore, joint space trajectories can be accurately differentiated using Bézier curves. Consequently, the derivatives of joint space trajectories are used in the calculation of the dynamics and control effort (torque profiles) of the robotic manipulator.<ref name=Malik2021 /> ==See also== * [[Bézier surface]] * [[B-spline]] * [[GEM/4]] and [[GEM/5]] * [[Hermite curve]] * [[NURBS]] * [[String art]] – Bézier curves are also formed by many common forms of string art, where strings are looped across a frame of nails.<ref>{{cite book |last=Gross |first=Renan |date=2014 |chapter=Bridges, String Art, and Bézier Curves |title=The Best Writing on Mathematics 2013 |pages=77–89 |publisher=Princeton University Press |jstor=j.ctt4cgb74.13 |isbn=9780691160412 |doi=10.1515/9781400847990-011 |editor-last=Pitici |editor-first=Mircea }}</ref> * [[Variation diminishing property of Bézier curves]] ==Notes== {{NoteFoot}} ==References== ===Citations=== {{Reflist}} ===Sources=== {{refbegin}} * {{cite journal |author = Rida T. Farouki |url = http://mae.engr.ucdavis.edu/~farouki/bernstein.pdf |title = The Bernstein polynomial basis: A centennial retrospective |journal=Computer Aided Geometric Design |volume=29 |issue=6 |date=August 2012 |pages=379–419 |doi=10.1016/j.cagd.2012.03.001 }} * {{cite book |author=Paul Bourke |title = Bézier Surfaces (in 3D) |url = http://local.wasp.uwa.edu.au/~pbourke/geometry/bezier/index.html |archive-url = https://web.archive.org/web/20090719011857/http://local.wasp.uwa.edu.au/~pbourke/geometry/bezier/index.html |url-status=dead |archive-date=2009-07-19 |date=2009-07-19 }} * {{cite book |author=Donald Knuth |title=Metafont: the Program |publisher=Addison-Wesley |year = 1986 |pages=123–131 |author-link = Donald Knuth }} Excellent discussion of implementation details; available for free as part of the TeX distribution. * {{cite book |author=Thomas Sederberg |title = Bézier curves |url = http://www.tsplines.com/resources/class_notes/Bezier_curves.pdf |access-date=2005-09-14 |archive-url = https://web.archive.org/web/20060221000535/http://www.tsplines.com/resources/class_notes/Bezier_curves.pdf |archive-date=2006-02-21 |url-status=dead }} * {{cite book |author=J. D. Foley |display-authors=etal |title=Computer Graphics: Principles and Practice in C |edition=2nd |publisher=Addison Wesley |year = 1992 |title-link=Computer Graphics: Principles and Practice#Second Edition in C }} * {{cite web |author=Rajiv Chandel |url = http://codingg.blogspot.in/2014/03/implementing-bezier-curves-in-games.html |title = Implementing Bezier Curves in games |date=2014-03-20 }} {{refend}} ==Further reading== * [https://pomax.github.io/bezierinfo A Primer on Bézier Curves]{{snd}} an open source online book explaining Bézier curves and associated graphics algorithms, with interactive graphics * [http://vimeo.com/106757336 Cubic Bezier Curves – Under the Hood (video)]{{snd}} video showing how computers render a cubic Bézier curve, by Peter Nowell * [https://www.ams.org/featurecolumn/archive/bezier.html#2 From Bézier to Bernstein] Feature Column from [[American Mathematical Society]] * {{springer |title = Bézier curve |id = p/b110460 }} * {{cite book |first1 = Hartmut |last1 = Prautzsch |first2 = Wolfgang |last2 = Boehm |first3 = Marco |last3 = Paluszny |title = Bézier and B-Spline Techniques |year = 2002 |publisher = Springer Science & Business Media |isbn = 978-3-540-43761-1 }} * {{cite book |chapter-url= http://www.cis.upenn.edu/~jean/gbooks/geom1.html |title = Curves and Surfaces in Geometric Modeling: Theory and Algorithms |first = Jean |last = Gallier |author-link = Jean Gallier |publisher = Morgan Kaufmann |year=1999 |chapter = Chapter 5. Polynomial Curves as Bézier Curves }} This book is out of print and freely available from the author. * {{cite book |first = Gerald E. |last = Farin |title = Curves and Surfaces for CAGD: A Practical Guide |year = 2002 |publisher = Morgan Kaufmann |isbn = 978-1-55860-737-8 |edition = 5th |url = http://www.farinhansford.com/books/cagd/ }} * {{Mathworld |urlname = BezierCurve |title = Bézier Curve }} * {{cite web |first = Gernot |last = Hoffmann |title = Bézier Curves |url = http://www.fho-emden.de/~hoffmann/bezier18122002.pdf |archive-url = https://web.archive.org/web/20061202151511/http://www.fho-emden.de/~hoffmann/bezier18122002.pdf |archive-date = 2006-12-02 }} (60 pages) * {{cite journal |doi = 10.1016/j.cam.2003.10.008 |title = Approximation of circular arcs and offset curves by Bézier curves of high degree |journal = [[Journal of Computational and Applied Mathematics]] |year=2004 |volume=167 |issue=2 |pages = 405–416 |first = Young Joon |last = Ahn |bibcode = 2004JCoAM.167..405A |doi-access = free }} * {{cite web |first = Jason |last = Davies |url = https://www.jasondavies.com/animated-bezier/ |title = Animated Bézier curves }} * {{cite web |first = Chad |last = Hovey |url = https://github.com/sandialabs/sibl#documentation |title = Bézier Geometry |website = [[GitHub]] |date = 20 May 2022 }} * Hovey, Chad (2022). Formulation and Python Implementation of Bézier and B-Spline Geometry. [https://hovey.github.io/docs/Hovey_2022_Bezier_B-Spline_SAND2022-7702_C.pdf SAND2022-7702C]. (153 pages) ==External links== ; Computer code *[https://github.com/msteinbeck/tinyspline TinySpline: Open source C-library for NURBS, B-splines and Bézier curves with bindings for various languages] * [https://github.com/staticbezier/ffd C++ library to generate Bézier functions at compile time] *[https://gist.github.com/tikoyes94/02541e60f444359d9a914778983405d9 Simple Bézier curve implementation via recursive method in Python] {{DEFAULTSORT:Bezier curve}} [[Category:Graphic design]] [[Category:Digital typography]] [[Category:Interpolation]] [[Category:Curves]] [[Category:Design]] [[Category:French inventions]]
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)
Templates used on this page:
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite conference
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite report
(
edit
)
Template:Cite web
(
edit
)
Template:IPA
(
edit
)
Template:IPAc-en
(
edit
)
Template:Mathworld
(
edit
)
Template:NoteFoot
(
edit
)
Template:NoteTag
(
edit
)
Template:Nowrap
(
edit
)
Template:Refbegin
(
edit
)
Template:Refend
(
edit
)
Template:Reflist
(
edit
)
Template:Respell
(
edit
)
Template:Short description
(
edit
)
Template:Snd
(
edit
)
Template:Springer
(
edit
)
Search
Search
Editing
Bézier curve
Add topic