fbpx
Wikipedia

Bézier curve

A Bézier curve (/ˈbɛz.i./ BEH-zee-ay)[1] is a parametric curve used in computer graphics and related fields.[2] 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 French engineer Pierre Bézier (1910–1999), who used it in the 1960s for designing curves for the bodywork of Renault cars.[3] Other uses include the design of computer fonts and animation.[3] Bézier curves can be combined to form a Bézier spline, or generalized to higher dimensions to form Bézier surfaces.[3] The Bézier triangle is a special case of the latter.

Cubic Bézier curve with four control points
The basis functions on the range t in [0,1] for cubic Bézier curves: blue: y = (1 − t)3, green: y = 3(1 − t)2t, red: y = 3(1 − t)t2, and cyan: y = t3.

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,[note 1] are combinations of linked Bézier curves. Paths are not bound by the limits of rasterized images and are intuitive to modify.

Bézier curves are also used in the time domain, particularly in animation,[4][note 2] user interface design and smoothing cursor trajectory in eye gaze controlled interfaces.[5] 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 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 Edit

The mathematical basis for Bézier curves—the Bernstein polynomials—was established in 1912, but the polynomials were not applied to graphics until some 50 years later when mathematician Paul de Casteljau in 1959 developed de Casteljau's algorithm, a numerically stable method for evaluating the curves, and became the first to apply them to computer-aided design at French automaker Citroën.[6] Yet, de Casteljau's method was patented in France but not published until the 1980s[7] while the Bézier polynomials were widely publicised in the 1960s by the French engineer Pierre Bézier, who discovered them independently and used them to design automobile bodies at Renault.

Specific cases Edit

A Bézier curve is defined by a set of control points P0 through Pn, 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 combinations – that is, the coefficients sum to 1.

Linear Bézier curves Edit

Given distinct points P0 and P1, a linear Bézier curve is simply a line between those two points. The curve is given by

 

and is equivalent to linear interpolation. The quantity   represents the displacement vector from the start point to the end point.

Quadratic Bézier curves Edit

 
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 B(t), given points P0, P1, and P2,

 ,

which can be interpreted as the linear interpolant of corresponding points on the linear Bézier curves from P0 to P1 and from P1 to P2 respectively. Rearranging the preceding equation yields:

 

This can be written in a way that highlights the symmetry with respect to P1:

 

Which immediately gives the derivative of the Bézier curve with respect to t:

 

from which it can be concluded that the tangents to the curve at P0 and P2 intersect at P1. As t increases from 0 to 1, the curve departs from P0 in the direction of P1, then bends to arrive at P2 from the direction of P1.

The second derivative of the Bézier curve with respect to t is

 

Cubic Bézier curves Edit

Four points P0, P1, P2 and P3 in the plane or in higher-dimensional space define a cubic Bézier curve. The curve starts at P0 going toward P1 and arrives at P3 coming from the direction of P2. Usually, it will not pass through P1 or P2; these points are only there to provide directional information. The distance between P1 and P2 determines "how far" and "how fast" the curve moves towards P1 before turning towards P2.

Writing BPi,Pj,Pk(t) for the quadratic Bézier curve defined by points Pi, Pj, and Pk, the cubic Bézier curve can be defined as an affine combination of two quadratic Bézier curves:

 

The explicit form of the curve is:

 

For some choices of P1 and P2 the curve may intersect itself, or contain a 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.[8]

The derivative of the cubic Bézier curve with respect to t is

 

The second derivative of the Bézier curve with respect to t is

 

General definition Edit

Bézier curves can be defined for any degree n.

Recursive definition Edit

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   denote the Bézier curve determined by any selection of points P0, P1, ..., Pk. Then to start,

 
 

This recursion is elucidated in the animations below.

Explicit definition Edit

The formula can be expressed explicitly as follows (where t0 and (1-t)0 are extended continuously to be 1 throughout [0,1]):

 

where   are the binomial coefficients.

For example, when n = 5:

 

Terminology Edit

Some terminology is associated with these parametric curves. We have

 

where the polynomials

 

are known as Bernstein basis polynomials of degree n.

t0 = 1, (1 − t)0 = 1, and the binomial coefficient,  , is:

 

The points Pi are called control points for the Bézier curve. The polygon formed by connecting the Bézier points with lines, starting with P0 and finishing with Pn, is called the Bézier polygon (or control polygon). The convex hull of the Bézier polygon contains the Bézier curve.

Polynomial form Edit

Sometimes it is desirable to express the Bézier curve as a polynomial instead of a sum of less straightforward Bernstein polynomials. Application of the binomial theorem to the definition of the curve followed by some rearrangement will yield

 

where

 

This could be practical if   can be computed prior to many evaluations of  ; 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 Edit

 
A cubic Bézier curve (yellow) can be made identical to a quadratic one (black) by
1. copying the end points, and
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).
  • The curve begins at   and ends at  ; 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   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   from an outer control point on a unit circle, where   (i.e.  ), and  .
  • 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   is equivalent (including the parametrization) to the degree n + 1 curve with control points  , where  ,   and define  ,  .
  • 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.[9]
  • 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."[10]
  • A Bézier curve of order higher than two may intersect itself or have a cusp for certain choices of the control points.

Second-order curve is a parabolic segment Edit

 
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".[11] With reference to the figure on the right, the important features of the parabola can be derived as follows:[12]

  1. Tangents to the parabola at the endpoints of the curve (A and B) intersect at its control point (C).
  2. 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.
  3. 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).
  4. 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 Edit

The derivative for a curve of order n is

 

Constructing Bézier curves Edit

Linear curves Edit

Let t denote the fraction of progress (from 0 to 1) the point B(t) has made along its traversal from P0 to P1. For example, when t=0.25, B(t) is one quarter of the way from point P0 to P1. As t varies from 0 to 1, B(t) draws a line from P0 to P1.

 
Animation of a linear Bézier curve, t in [0,1]

Quadratic curves Edit

For quadratic Bézier curves one can construct intermediate points Q0 and Q1 such that as t varies from 0 to 1:

  • Point Q0(t) varies from P0 to P1 and describes a linear Bézier curve.
  • Point Q1(t) varies from P1 to P2 and describes a linear Bézier curve.
  • Point B(t) is interpolated linearly between Q0(t) to Q1(t) and describes a quadratic Bézier curve.
   
Construction of a quadratic Bézier curve Animation of a quadratic Bézier curve, t in [0,1]

Higher-order curves Edit

For higher-order curves one needs correspondingly more intermediate points. For cubic curves one can construct intermediate points Q0, Q1, and Q2 that describe linear Bézier curves, and points R0 and R1 that describe quadratic Bézier curves:

   
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 Q0, Q1, Q2 and Q3 that describe linear Bézier curves, points R0, R1 and R2 that describe quadratic Bézier curves, and points S0 and S1 that describe cubic Bézier curves:

   
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.

 
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.[13]

Offsets (or stroking) of Bézier curves Edit

The curve at a fixed offset from a given Bézier curve, called an 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[14] and more generally for a Bézier of degree n the two-sided offset curve is an algebraic curve of degree 4n − 2.[15] However, there are heuristic methods that usually give an adequate approximation for practical purposes.[16]

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).[14] The conversion from offset curves to filled Bézier contours is of practical importance in converting fonts defined in Metafont, which require stroking of Bézier curves, to the more widely used PostScript type 1 fonts, which only require (for efficiency purposes) the mathematically simpler operation of filling a contour defined by (non-self-intersecting) Bézier curves.[17]

Degree elevation Edit

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   Each component   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.

 

For arbitrary n we use equalities

 

Therefore:

 

introducing arbitrary   and  .

Therefore, new control points are[18]

 

Repeated degree elevation Edit

The concept of degree elevation can be repeated on a control polygon R to get a sequence of control polygons R, R1, R2, and so on. After r degree elevations, the polygon Rr has the vertices P0,r, P1,r, P2,r, ..., Pn+r,r given by [18]

 

It can also be shown that for the underlying Bézier curve B,

 

Rational Bézier curves Edit

 
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 polynomials. Rational Bézier curves can, among other uses, be used to represent segments of conic sections exactly, including circular arcs.[19]

Given n + 1 control points P0, ..., Pn, the rational Bézier curve can be described by

 

or simply

 

The expression can be extended by using number systems besides reals for the weights. In the complex plane the points {1}, {-1}, and {1} with weights { }, {1}, and { } 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.[20] Scaling the central weight of the above curve by 1.35508 gives a more uniform parameterization.

Applications Edit

Computer graphics Edit

 
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 points, the points can be graphically displayed and used to manipulate the curve intuitively. Affine transformations such as translation and rotation can be applied on the curve by applying the respective transform on the control points of the curve.

Quadratic and 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 SVG) and vector graphics programs (like Artline, Timeworks Publisher, Adobe Illustrator, CorelDraw, Inkscape, and Allegro). In order to join Bézier curves into a composite Bézier curve without kinks, a property called G1 continuous, it 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.

 
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.[21]

The simplest method for scan converting (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.[22]

Analytical methods where a Bézier is intersected with each scan line involve finding roots of cubic polynomials (for cubic Béziers) and dealing with multiple roots, so they are not often used in practice.[22]

The rasterisation algorithm used in Metafont is based on discretising the curve, so that it is approximated by a sequence of "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  ), 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   values where it is parallel to one of these lines can be done by solving quadratic equations. 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.[23]

There is also a modified curve form of 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.[24]

Animation Edit

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.[25][26]

In 3D animation, Bézier curves are often used to define 3D paths as well as 2D curves for keyframe interpolation.[27] Bézier curves are now very frequently used to control the animation easing in CSS, JavaScript, JavaFx and Flutter SDK.[4]

Fonts Edit

TrueType fonts use composite Bézier curves composed of quadratic Bézier curves. Other languages and imaging tools (such as PostScript, Asymptote, Metafont, and 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.[28]

Font engines, like FreeType, draw the font's curves (and lines) on a pixellated surface using a process known as font rasterization.[11] 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.[29]

Because arcs of circles and ellipses 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 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]

Robotics Edit

Bézier curves can be used in robotics to produce trajectories of an end-effector due to the virtue of the control polygon’s ability to give a clear indication of whether the path is colliding with any nearby obstacle or object.[30] 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.[30]

See also Edit

Notes Edit

  1. ^ Image manipulation programs such as Inkscape, Adobe Photoshop, and GIMP.
  2. ^ In animation applications such as Adobe Flash, Adobe After Effects, Microsoft Expression Blend, Blender, Autodesk Maya and Autodesk 3ds Max.

References Edit

Citations Edit

  1. ^ Wells, John (3 April 2008). Longman Pronunciation Dictionary (3rd ed.). Pearson Longman. ISBN 978-1-4058-8118-0.
  2. ^ Mortenson, Michael E. (1999). Mathematics for Computer Graphics Applications. Industrial Press Inc. p. 264. ISBN 9780831131111.
  3. ^ a b c Hazewinkel, Michiel (1997). Encyclopaedia of Mathematics: Supplement. Vol. 1. Springer Science & Business Media. p. 119. ISBN 9780792347095.
  4. ^ a b "Cubic class - animation library - Dart API". api.flutter.dev. Retrieved 2021-04-26.
  5. ^ Biswas, Pradipta; Langdon, Pat (2015-04-03). "Multimodal Intelligent Eye-Gaze Tracking System". International Journal of Human-Computer Interaction. 31 (4): 277–294. doi:10.1080/10447318.2014.1001301. ISSN 1044-7318. S2CID 36347027.
  6. ^ Gerald E. Farin; Josef Hoschek; Myung-Soo Kim (2002). Handbook of Computer Aided Geometric Design. Elsevier. pp. 4–6. ISBN 978-0-444-51104-1.
  7. ^ Paul de Casteljau. Mathématiques et CAO. Tome 2 : Formes à pôles. ISBN 9782866010423.
  8. ^ John Burkardt. . Archived from the original on 2013-12-25.
  9. ^ Teofilo Gonzalez; Jorge Diaz-Herrera; Allen Tucker (2014). Computing Handbook, Third Edition: Computer Science and Software Engineering. CRC Press. page 32-14. ISBN 978-1-4398-9852-9.
  10. ^ Max K. Agoston (2005). Computer Graphics and Geometric Modelling: Implementation & Algorithms. Springer Science & Business Media. p. 404. ISBN 978-1-84628-108-2.
  11. ^ a b "FreeType Glyph Conventions / VI. FreeType outlines". The Free Type Project. 13 February 2018.
    . 6 March 2011. Archived from the original on 2011-09-29.
  12. ^ Duncan Marsh (2005). Applied Geometry for Computer Graphics and CAD. Springer Undergraduate Mathematics Series (2nd ed.). ISBN 978-1-85233-801-5. ASIN 1852338016.
  13. ^ Shene, C. K. "Finding a Point on a Bézier Curve: De Casteljau's Algorithm". Retrieved 6 September 2012.
  14. ^ a b Mark Kilgard (April 10, 2012). "CS 354 Vector Graphics & Path Rendering". p. 28.
  15. ^ Rida T. Farouki. (PDF). Archived from the original (PDF) on June 5, 2015., particularly p. 16 "taxonomy of offset curves".
  16. ^ For example: [1] or [2]. For a survey see [3].
  17. ^ Richard J. Kinch (1995). "MetaFog: Converting Metafont shapes to contours" (PDF). TUGboat. 16 (3–Proceedings of the 1995 Annual Meeting). Archived (PDF) from the original on 2022-10-09.
  18. ^ a b Farin, Gerald (1997). Curves and surfaces for computer-aided geometric design (4 ed.). Elsevier Science & Technology Books. ISBN 978-0-12-249054-5.
  19. ^ Neil Dodgson (2000-09-25). "Some Mathematical Elements of Graphics: Rational B-splines". Retrieved 2009-02-23.
  20. ^ J. Sánchez-Reyes (November 2009). "Complex rational Bézier curves". Computer Aided Geometric Design. 26 (8): 865–876. doi:10.1016/j.cagd.2009.06.003.
  21. ^ Alexander Reshetov and David Luebke, Phantom Ray-Hair Intersector. In Proceedings of the ACM on Computer Graphics and Interactive Techniques (August 1, 2018). [4]
  22. ^ a b Xuexiang Li & Junxiao Xue. "Complex Quadratic Bézier Curve on Unit Circle". Zhengzhou, China: School of Software, Zhengzhou University.
  23. ^ Parts 19–22 of Knuth, Donald E. (1986). Metafont: The Program. Addison-Wesley. ISBN 0-201-13438-1.
  24. ^ Zingl, Alois "A Rasterizing Algorithm for Drawing Curves" (2012) http://members.chello.at/~easyfilter/Bresenham.pdf
  25. ^ "Using motion paths in animations". Adobe. Retrieved 2019-04-11.
  26. ^ "Following a Spline". Synfig Wiki. Retrieved 2019-04-11.
  27. ^ Dodgson, Neil A. (1999). "Advanced Graphics Lecture Notes" (PDF). cl.cam.ac.uk. University of Cambridge Computer Laboratory. Archived (PDF) from the original on 2022-10-09.
  28. ^ . Know How. Linotype. Archived from the original on 2017-07-03. Retrieved 3 July 2018. 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.
  29. ^ . Rotating Machinery Analysis, Inc. Archived from the original on 2011-07-18. Retrieved 2011-02-05.
  30. ^ a b Malik, Aryslan; Henderson, Troy; Prazenica, Richard (January 2021). "Trajectory Generation for a Multibody Robotic System using the Product of Exponentials Formulation". AIAA Scitech 2021 Forum: 2016. doi:10.2514/6.2021-2016. ISBN 978-1-62410-609-5. S2CID 234251587.
  31. ^ Gross, Renan (2014). "Bridges, String Art, and Bézier Curves". In Pitici, Mircea (ed.). The Best Writing on Mathematics 2013. Princeton University Press. pp. 77–89. doi:10.1515/9781400847990-011. ISBN 9780691160412. JSTOR j.ctt4cgb74.13.

Sources Edit

  • Rida T. Farouki (August 2012). "The Bernstein polynomial basis: A centennial retrospective" (PDF). Computer Aided Geometric Design. 29 (6): 379–419. doi:10.1016/j.cagd.2012.03.001.
  • Paul Bourke (2009-07-19). . Archived from the original on 2009-07-19.
  • Donald Knuth (1986). Metafont: the Program. Addison-Wesley. pp. 123–131. Excellent discussion of implementation details; available for free as part of the TeX distribution.
  • Thomas Sederberg. (PDF). Archived from the original (PDF) on 2006-02-21. Retrieved 2005-09-14.
  • J. D. Foley; et al. (1992). Computer Graphics: Principles and Practice in C (2nd ed.). Addison Wesley.
  • Rajiv Chandel (2014-03-20). "Implementing Bezier Curves in games".

Further reading Edit

  • A Primer on Bézier Curves – an open source online book explaining Bézier curves and associated graphics algorithms, with interactive graphics
  • Cubic Bezier Curves – Under the Hood (video) – video showing how computers render a cubic Bézier curve, by Peter Nowell
  • From Bézier to Bernstein Feature Column from American Mathematical Society
  • "Bézier curve", Encyclopedia of Mathematics, EMS Press, 2001 [1994]
  • Prautzsch, Hartmut; Boehm, Wolfgang; Paluszny, Marco (2002). Bézier and B-Spline Techniques. Springer Science & Business Media. ISBN 978-3-540-43761-1.
  • Gallier, Jean (1999). "Chapter 5. Polynomial Curves as Bézier Curves". Curves and Surfaces in Geometric Modeling: Theory and Algorithms. Morgan Kaufmann. This book is out of print and freely available from the author.
  • Farin, Gerald E. (2002). Curves and Surfaces for CAGD: A Practical Guide (5th ed.). Morgan Kaufmann. ISBN 978-1-55860-737-8.
  • Weisstein, Eric W. "Bézier Curve". MathWorld.
  • Hoffmann, Gernot. (PDF). Archived from the original (PDF) on 2006-12-02. (60 pages)
  • Ahn, Young Joon (2004). "Approximation of circular arcs and offset curves by Bézier curves of high degree". Journal of Computational and Applied Mathematics. 167 (2): 405–416. Bibcode:2004JCoAM.167..405A. doi:10.1016/j.cam.2003.10.008.
  • Davies, Jason. "Animated Bézier curves".
  • Hovey, Chad (20 May 2022). "Bézier Geometry". GitHub.
  • Hovey, Chad (2022). Formulation and Python Implementation of Bézier and B-Spline Geometry. SAND2022-7702C. (153 pages)

External links Edit

Computer code
  • TinySpline: Open source C-library for NURBS, B-splines and Bézier curves with bindings for various languages
  • C++ library to generate Bézier functions at compile time
  • Simple Bézier curve implementation via recursive method in Python

bézier, curve, parametric, curve, used, computer, graphics, related, fields, discrete, control, points, defines, smooth, continuous, curve, means, formula, usually, curve, intended, approximate, real, world, shape, that, otherwise, mathematical, representation. A Bezier curve ˈ b ɛ z i eɪ BEH zee ay 1 is a parametric curve used in computer graphics and related fields 2 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 Bezier curve is named after French engineer Pierre Bezier 1910 1999 who used it in the 1960s for designing curves for the bodywork of Renault cars 3 Other uses include the design of computer fonts and animation 3 Bezier curves can be combined to form a Bezier spline or generalized to higher dimensions to form Bezier surfaces 3 The Bezier triangle is a special case of the latter Cubic Bezier curve with four control pointsThe basis functions on the range t in 0 1 for cubic Bezier curves blue y 1 t 3 green y 3 1 t 2t red y 3 1 t t2 and cyan y t3 In vector graphics Bezier curves are used to model smooth curves that can be scaled indefinitely Paths as they are commonly referred to in image manipulation programs note 1 are combinations of linked Bezier curves Paths are not bound by the limits of rasterized images and are intuitive to modify Bezier curves are also used in the time domain particularly in animation 4 note 2 user interface design and smoothing cursor trajectory in eye gaze controlled interfaces 5 For example a Bezier 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 interface designers talk about the physics or feel of an operation they may be referring to the particular Bezier 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 Contents 1 Invention 2 Specific cases 2 1 Linear Bezier curves 2 2 Quadratic Bezier curves 2 3 Cubic Bezier curves 3 General definition 3 1 Recursive definition 3 2 Explicit definition 3 3 Terminology 3 4 Polynomial form 3 5 Properties 3 6 Second order curve is a parabolic segment 3 7 Derivative 4 Constructing Bezier curves 4 1 Linear curves 4 2 Quadratic curves 4 3 Higher order curves 4 4 Offsets or stroking of Bezier curves 5 Degree elevation 5 1 Repeated degree elevation 6 Rational Bezier curves 7 Applications 7 1 Computer graphics 7 2 Animation 7 3 Fonts 7 4 Robotics 8 See also 9 Notes 10 References 10 1 Citations 10 2 Sources 11 Further reading 12 External linksInvention EditThe mathematical basis for Bezier curves the Bernstein polynomials was established in 1912 but the polynomials were not applied to graphics until some 50 years later when mathematician Paul de Casteljau in 1959 developed de Casteljau s algorithm a numerically stable method for evaluating the curves and became the first to apply them to computer aided design at French automaker Citroen 6 Yet de Casteljau s method was patented in France but not published until the 1980s 7 while the Bezier polynomials were widely publicised in the 1960s by the French engineer Pierre Bezier who discovered them independently and used them to design automobile bodies at Renault Specific cases EditA Bezier curve is defined by a set of control points P0 through Pn 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 combinations that is the coefficients sum to 1 Linear Bezier curves Edit Given distinct points P0 and P1 a linear Bezier curve is simply a line between those two points The curve is given by B t P 0 t P 1 P 0 1 t P 0 t P 1 0 t 1 displaystyle mathbf B t mathbf P 0 t mathbf P 1 mathbf P 0 1 t mathbf P 0 t mathbf P 1 0 leq t leq 1 nbsp and is equivalent to linear interpolation The quantity P 1 P 0 displaystyle mathbf P 1 mathbf P 0 nbsp represents the displacement vector from the start point to the end point Quadratic Bezier curves Edit nbsp Quadratic Beziers in string art The end points and control point define the quadratic Bezier curve A quadratic Bezier curve is the path traced by the function B t given points P0 P1 and P2 B t 1 t 1 t P 0 t P 1 t 1 t P 1 t P 2 0 t 1 displaystyle 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 leq t leq 1 nbsp which can be interpreted as the linear interpolant of corresponding points on the linear Bezier curves from P0 to P1 and from P1 to P2 respectively Rearranging the preceding equation yields B t 1 t 2 P 0 2 1 t t P 1 t 2 P 2 0 t 1 displaystyle mathbf B t 1 t 2 mathbf P 0 2 1 t t mathbf P 1 t 2 mathbf P 2 0 leq t leq 1 nbsp This can be written in a way that highlights the symmetry with respect to P1 B t P 1 1 t 2 P 0 P 1 t 2 P 2 P 1 0 t 1 displaystyle mathbf B t mathbf P 1 1 t 2 mathbf P 0 mathbf P 1 t 2 mathbf P 2 mathbf P 1 0 leq t leq 1 nbsp Which immediately gives the derivative of the Bezier curve with respect to t B t 2 1 t P 1 P 0 2 t P 2 P 1 displaystyle mathbf B t 2 1 t mathbf P 1 mathbf P 0 2t mathbf P 2 mathbf P 1 nbsp from which it can be concluded that the tangents to the curve at P0 and P2 intersect at P1 As t increases from 0 to 1 the curve departs from P0 in the direction of P1 then bends to arrive at P2 from the direction of P1 The second derivative of the Bezier curve with respect to t is B t 2 P 2 2 P 1 P 0 displaystyle mathbf B t 2 mathbf P 2 2 mathbf P 1 mathbf P 0 nbsp Cubic Bezier curves Edit Four points P0 P1 P2 and P3 in the plane or in higher dimensional space define a cubic Bezier curve The curve starts at P0 going toward P1 and arrives at P3 coming from the direction of P2 Usually it will not pass through P1 or P2 these points are only there to provide directional information The distance between P1 and P2 determines how far and how fast the curve moves towards P1 before turning towards P2 Writing BPi Pj Pk t for the quadratic Bezier curve defined by points Pi Pj and Pk the cubic Bezier curve can be defined as an affine combination of two quadratic Bezier curves B t 1 t B P 0 P 1 P 2 t t B P 1 P 2 P 3 t 0 t 1 displaystyle 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 leq t leq 1 nbsp The explicit form of the curve is B t 1 t 3 P 0 3 1 t 2 t P 1 3 1 t t 2 P 2 t 3 P 3 0 t 1 displaystyle mathbf B t 1 t 3 mathbf P 0 3 1 t 2 t mathbf P 1 3 1 t t 2 mathbf P 2 t 3 mathbf P 3 0 leq t leq 1 nbsp For some choices of P1 and P2 the curve may intersect itself or contain a cusp Any series of 4 distinct points can be converted to a cubic Bezier curve that goes through all 4 points in order Given the starting and ending point of some cubic Bezier curve and the points along the curve corresponding to t 1 3 and t 2 3 the control points for the original Bezier curve can be recovered 8 The derivative of the cubic Bezier curve with respect to t is B t 3 1 t 2 P 1 P 0 6 1 t t P 2 P 1 3 t 2 P 3 P 2 displaystyle 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 nbsp The second derivative of the Bezier curve with respect to t is B t 6 1 t P 2 2 P 1 P 0 6 t P 3 2 P 2 P 1 displaystyle 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 nbsp General definition EditBezier curves can be defined for any degree n Recursive definition Edit A recursive definition for the Bezier curve of degree n expresses it as a point to point linear combination linear interpolation of a pair of corresponding points in two Bezier curves of degree n 1 Let B P 0 P 1 P k displaystyle mathbf B mathbf P 0 mathbf P 1 ldots mathbf P k nbsp denote the Bezier curve determined by any selection of points P0 P1 Pk Then to start B P 0 t P 0 and displaystyle mathbf B mathbf P 0 t mathbf P 0 text and nbsp B t B P 0 P 1 P n t 1 t B P 0 P 1 P n 1 t t B P 1 P 2 P n t displaystyle 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 nbsp This recursion is elucidated in the animations below Explicit definition Edit The formula can be expressed explicitly as follows where t0 and 1 t 0 are extended continuously to be 1 throughout 0 1 B t i 0 n n i 1 t n i t i P i 1 t n P 0 n 1 1 t n 1 t P 1 n n 1 1 t t n 1 P n 1 t n P n 0 t 1 displaystyle begin aligned mathbf B t amp sum i 0 n n choose i 1 t n i t i mathbf P i amp 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 amp amp 0 leqslant t leqslant 1 end aligned nbsp where n i displaystyle scriptstyle n choose i nbsp are the binomial coefficients For example when n 5 B t 1 t 5 P 0 5 t 1 t 4 P 1 10 t 2 1 t 3 P 2 10 t 3 1 t 2 P 3 5 t 4 1 t P 4 t 5 P 5 0 t 1 displaystyle begin aligned mathbf B t amp 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 amp amp 0 leqslant t leqslant 1 end aligned nbsp Terminology Edit Some terminology is associated with these parametric curves We have B t i 0 n b i n t P i 0 t 1 displaystyle mathbf B t sum i 0 n b i n t mathbf P i 0 leq t leq 1 nbsp where the polynomials b i n t n i t i 1 t n i i 0 n displaystyle b i n t n choose i t i 1 t n i i 0 ldots n nbsp are known as Bernstein basis polynomials of degree n t0 1 1 t 0 1 and the binomial coefficient n i displaystyle scriptstyle n choose i nbsp is n i n i n i displaystyle n choose i frac n i n i nbsp The points Pi are called control points for the Bezier curve The polygon formed by connecting the Bezier points with lines starting with P0 and finishing with Pn is called the Bezier polygon or control polygon The convex hull of the Bezier polygon contains the Bezier curve Polynomial form Edit Sometimes it is desirable to express the Bezier curve as a polynomial instead of a sum of less straightforward Bernstein polynomials Application of the binomial theorem to the definition of the curve followed by some rearrangement will yield B t j 0 n t j C j displaystyle mathbf B t sum j 0 n t j mathbf C j nbsp where C j n n j i 0 j 1 i j P i i j i m 0 j 1 n m i 0 j 1 i j P i i j i displaystyle 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 nbsp This could be practical if C j displaystyle mathbf C j nbsp can be computed prior to many evaluations of B t displaystyle mathbf B t nbsp 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 Edit nbsp A cubic Bezier curve yellow can be made identical to a quadratic one black by 1 copying the end points and 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 The curve begins at P 0 displaystyle mathbf P 0 nbsp and ends at P n displaystyle mathbf P n nbsp 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 Bezier polygon respectively A curve can be split at any point into two subcurves or into arbitrarily many subcurves each of which is also a Bezier curve Some curves that seem simple such as the circle cannot be described exactly by a Bezier or piecewise Bezier curve though a four piece cubic Bezier curve can approximate a circle see composite Bezier 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 4 2 1 3 displaystyle textstyle frac 4 left sqrt 2 1 right 3 nbsp horizontally or vertically from an outer control point on a unit circle More generally an n piece cubic Bezier curve can approximate a circle when each inner control point is the distance 4 3 tan t 4 displaystyle textstyle frac 4 3 tan t 4 nbsp from an outer control point on a unit circle where t 2 p n textstyle t 2 pi n nbsp i e t 360 n displaystyle t 360 circ n nbsp and n gt 2 displaystyle n gt 2 nbsp Every quadratic Bezier curve is also a cubic Bezier curve and more generally every degree n Bezier curve is also a degree m curve for any m gt n In detail a degree n curve with control points P 0 P n displaystyle mathbf P 0 dots mathbf P n nbsp is equivalent including the parametrization to the degree n 1 curve with control points P 0 P n 1 displaystyle mathbf P 0 dots mathbf P n 1 nbsp where P k k n 1 P k 1 1 k n 1 P k displaystyle mathbf P k tfrac k n 1 mathbf P k 1 left 1 tfrac k n 1 right mathbf P k nbsp k 0 1 n n 1 displaystyle forall k 0 1 dots n n 1 nbsp and define P n 1 P 0 displaystyle mathbf P n 1 mathbf P 0 nbsp P 1 P n displaystyle mathbf P 1 mathbf P n nbsp Bezier curves have the variation diminishing property What this means in intuitive terms is that a Bezier curve does not undulate more than the polygon of its control points and may actually undulate less than that 9 There is no local control in degree n Bezier 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 10 A Bezier curve of order higher than two may intersect itself or have a cusp for certain choices of the control points Second order curve is a parabolic segment Edit nbsp Equivalence of a quadratic Bezier curve and a parabolic segmentA quadratic Bezier curve is also a segment of a parabola As a parabola is a conic section some sources refer to quadratic Beziers as conic arcs 11 With reference to the figure on the right the important features of the parabola can be derived as follows 12 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 Edit The derivative for a curve of order n is B t n i 0 n 1 b i n 1 t P i 1 P i displaystyle mathbf B t n sum i 0 n 1 b i n 1 t mathbf P i 1 mathbf P i nbsp Constructing Bezier curves EditLinear curves Edit Let t denote the fraction of progress from 0 to 1 the point B t has made along its traversal from P0 to P1 For example when t 0 25 B t is one quarter of the way from point P0 to P1 As t varies from 0 to 1 B t draws a line from P0 to P1 nbsp Animation of a linear Bezier curve t in 0 1 Quadratic curves Edit For quadratic Bezier curves one can construct intermediate points Q0 and Q1 such that as t varies from 0 to 1 Point Q0 t varies from P0 to P1 and describes a linear Bezier curve Point Q1 t varies from P1 to P2 and describes a linear Bezier curve Point B t is interpolated linearly between Q0 t to Q1 t and describes a quadratic Bezier curve nbsp nbsp Construction of a quadratic Bezier curve Animation of a quadratic Bezier curve t in 0 1 Higher order curves Edit For higher order curves one needs correspondingly more intermediate points For cubic curves one can construct intermediate points Q0 Q1 and Q2 that describe linear Bezier curves and points R0 and R1 that describe quadratic Bezier curves nbsp nbsp Construction of a cubic Bezier curve Animation of a cubic Bezier curve t in 0 1 For fourth order curves one can construct intermediate points Q0 Q1 Q2 and Q3 that describe linear Bezier curves points R0 R1 and R2 that describe quadratic Bezier curves and points S0 and S1 that describe cubic Bezier curves nbsp nbsp Construction of a quartic Bezier curve Animation of a quartic Bezier curve t in 0 1 For fifth order curves one can construct similar intermediate points nbsp Animation of a fifth order Bezier curve t in 0 1 in red The Bezier curves for each of the lower orders are also shown These representations rest on the process used in De Casteljau s algorithm to calculate Bezier curves 13 Offsets or stroking of Bezier curves Edit The curve at a fixed offset from a given Bezier curve called an 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 Bezier curve except in some trivial cases In general the two sided offset curve of a cubic Bezier is a 10th order algebraic curve 14 and more generally for a Bezier of degree n the two sided offset curve is an algebraic curve of degree 4n 2 15 However there are heuristic methods that usually give an adequate approximation for practical purposes 16 In the field of vector graphics painting two symmetrically distanced offset curves is called stroking the Bezier curve or in general a path of several Bezier segments 14 The conversion from offset curves to filled Bezier contours is of practical importance in converting fonts defined in Metafont which require stroking of Bezier curves to the more widely used PostScript type 1 fonts which only require for efficiency purposes the mathematically simpler operation of filling a contour defined by non self intersecting Bezier curves 17 Degree elevation EditA Bezier curve of degree n can be converted into a Bezier curve of degree n 1 with the same shape This is useful if software supports Bezier curves only of specific degree For example systems that can only work with cubic Bezier curves can implicitly work with quadratic curves by using their equivalent cubic representation To do degree elevation we use the equality B t 1 t B t t B t displaystyle mathbf B t 1 t mathbf B t t mathbf B t nbsp Each component b i n t P i displaystyle mathbf b i n t mathbf P i nbsp 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 1 t 2 P 0 2 1 t t P 1 t 2 P 2 1 t 3 P 0 2 1 t 2 t P 1 1 t t 2 P 2 1 t 2 t P 0 2 1 t t 2 P 1 t 3 P 2 1 t 3 P 0 1 t 2 t P 0 2 P 1 1 t t 2 2 P 1 P 2 t 3 P 2 1 t 3 P 0 3 1 t 2 t 1 3 P 0 2 P 1 3 1 t t 2 1 3 2 P 1 P 2 t 3 P 2 displaystyle begin aligned 1 t 2 mathbf P 0 2 1 t t mathbf P 1 t 2 mathbf P 2 amp 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 amp 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 amp 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 aligned nbsp For arbitrary n we use equalities n 1 i 1 t b i n n i b i n 1 n 1 i 1 t b i n n i b i 1 n 1 1 t b i n n 1 i n 1 b i n 1 t b i n i 1 n 1 b i 1 n 1 displaystyle 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 nbsp Therefore B t 1 t i 0 n b i n t P i t i 0 n b i n t P i i 0 n n 1 i n 1 b i n 1 t P i i 0 n i 1 n 1 b i 1 n 1 t P i i 0 n 1 i n 1 P i 1 n 1 i n 1 P i b i n 1 t i 0 n 1 b i n 1 t P i displaystyle begin aligned mathbf B t amp 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 amp 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 amp 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 amp sum i 0 n 1 mathbf b i n 1 t mathbf P i end aligned nbsp introducing arbitrary P 1 displaystyle mathbf P 1 nbsp and P n 1 displaystyle mathbf P n 1 nbsp Therefore new control points are 18 P i i n 1 P i 1 n 1 i n 1 P i i 0 n 1 displaystyle 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 nbsp Repeated degree elevation Edit The concept of degree elevation can be repeated on a control polygon R to get a sequence of control polygons R R1 R2 and so on After r degree elevations the polygon Rr has the vertices P0 r P1 r P2 r Pn r r given by 18 P i r j 0 n P j n j r i j n r i displaystyle mathbf P i r sum j 0 n mathbf P j tbinom n j frac tbinom r i j tbinom n r i nbsp It can also be shown that for the underlying Bezier curve B lim r R r B displaystyle mathbf lim r to infty R r mathbf B nbsp Rational Bezier curves Edit nbsp Segments of conic sections represented exactly by rational Bezier curvesThe rational Bezier curve adds adjustable weights to provide closer approximations to arbitrary shapes The numerator is a weighted Bernstein form Bezier curve and the denominator is a weighted sum of Bernstein polynomials Rational Bezier curves can among other uses be used to represent segments of conic sections exactly including circular arcs 19 Given n 1 control points P0 Pn the rational Bezier curve can be described by B t i 0 n b i n t P i w i i 0 n b i n t w i displaystyle 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 nbsp or simply B t i 0 n n i t i 1 t n i P i w i i 0 n n i t i 1 t n i w i displaystyle 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 nbsp The expression can be extended by using number systems besides reals for the weights In the complex plane the points 1 1 and 1 with weights i displaystyle i nbsp 1 and i displaystyle i nbsp 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 20 Scaling the central weight of the above curve by 1 35508 gives a more uniform parameterization Applications EditComputer graphics Edit nbsp Bezier path in Adobe IllustratorBezier curves are widely used in computer graphics to model smooth curves As the curve is completely contained in the convex hull of its control points the points can be graphically displayed and used to manipulate the curve intuitively Affine transformations such as translation and rotation can be applied on the curve by applying the respective transform on the control points of the curve Quadratic and cubic Bezier curves are most common Higher degree curves are more computationally expensive to evaluate When more complex shapes are needed low order Bezier curves are patched together producing a composite Bezier curve A composite Bezier curve is commonly referred to as a path in vector graphics languages like PostScript vector graphics standards like SVG and vector graphics programs like Artline Timeworks Publisher Adobe Illustrator CorelDraw Inkscape and Allegro In order to join Bezier curves into a composite Bezier curve without kinks a property called G1 continuous it suffices to force the control point at which two constituent Bezier curves meet to lie on the line defined by the two control points on either side nbsp Abstract composition of cubic Bezier curves ray traced in 3D Ray intersection with swept volumes along curves is calculated with Phantom Ray Hair Intersector algorithm 21 The simplest method for scan converting rasterizing a Bezier 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 22 Analytical methods where a Bezier is intersected with each scan line involve finding roots of cubic polynomials for cubic Beziers and dealing with multiple roots so they are not often used in practice 22 The rasterisation algorithm used in Metafont is based on discretising the curve so that it is approximated by a sequence of 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 y x displaystyle y pm x nbsp 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 t displaystyle t nbsp values where it is parallel to one of these lines can be done by solving quadratic equations 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 23 There is also a modified curve form of 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 24 Animation Edit In animation applications such as Adobe Flash and Synfig Bezier curves are used to outline for example movement Users outline the wanted path in Bezier curves and the application creates the needed frames for the object to move along the path 25 26 In 3D animation Bezier curves are often used to define 3D paths as well as 2D curves for keyframe interpolation 27 Bezier curves are now very frequently used to control the animation easing in CSS JavaScript JavaFx and Flutter SDK 4 Fonts Edit TrueType fonts use composite Bezier curves composed of quadratic Bezier curves Other languages and imaging tools such as PostScript Asymptote Metafont and SVG use composite Beziers composed of cubic Bezier curves for drawing curved shapes OpenType fonts can use either kind of curve depending on which font technology underlies the OpenType wrapper 28 Font engines like FreeType draw the font s curves and lines on a pixellated surface using a process known as font rasterization 11 Typically font engines and vector graphics engines render Bezier 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 29 Because arcs of circles and ellipses cannot be exactly represented by Bezier curves they are first approximated by Bezier curves which are in turn approximated by arcs of circles This is inefficient as there exists also approximations of all Bezier 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 Bezier and conic curves or surfaces into 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 Robotics Edit Bezier curves can be used in robotics to produce trajectories of an end effector due to the virtue of the control polygon s ability to give a clear indication of whether the path is colliding with any nearby obstacle or object 30 Furthermore joint space trajectories can be accurately differentiated using Bezier 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 30 See also EditBezier surface B spline GEM 4 and GEM 5 Hermite curve NURBS String art Bezier curves are also formed by many common forms of string art where strings are looped across a frame of nails 31 Variation diminishing property of Bezier curvesNotes Edit Image manipulation programs such as Inkscape Adobe Photoshop and GIMP In animation applications such as Adobe Flash Adobe After Effects Microsoft Expression Blend Blender Autodesk Maya and Autodesk 3ds Max References EditCitations Edit Wells John 3 April 2008 Longman Pronunciation Dictionary 3rd ed Pearson Longman ISBN 978 1 4058 8118 0 Mortenson Michael E 1999 Mathematics for Computer Graphics Applications Industrial Press Inc p 264 ISBN 9780831131111 a b c Hazewinkel Michiel 1997 Encyclopaedia of Mathematics Supplement Vol 1 Springer Science amp Business Media p 119 ISBN 9780792347095 a b Cubic class animation library Dart API api flutter dev Retrieved 2021 04 26 Biswas Pradipta Langdon Pat 2015 04 03 Multimodal Intelligent Eye Gaze Tracking System International Journal of Human Computer Interaction 31 4 277 294 doi 10 1080 10447318 2014 1001301 ISSN 1044 7318 S2CID 36347027 Gerald E Farin Josef Hoschek Myung Soo Kim 2002 Handbook of Computer Aided Geometric Design Elsevier pp 4 6 ISBN 978 0 444 51104 1 Paul de Casteljau Mathematiques et CAO Tome 2 Formes a poles ISBN 9782866010423 John Burkardt Forcing Bezier Interpolation Archived from the original on 2013 12 25 Teofilo Gonzalez Jorge Diaz Herrera Allen Tucker 2014 Computing Handbook Third Edition Computer Science and Software Engineering CRC Press page 32 14 ISBN 978 1 4398 9852 9 Max K Agoston 2005 Computer Graphics and Geometric Modelling Implementation amp Algorithms Springer Science amp Business Media p 404 ISBN 978 1 84628 108 2 a b FreeType Glyph Conventions VI FreeType outlines The Free Type Project 13 February 2018 FreeType Glyph Conventions Version 2 1 VI FreeType outlines 6 March 2011 Archived from the original on 2011 09 29 Duncan Marsh 2005 Applied Geometry for Computer Graphics and CAD Springer Undergraduate Mathematics Series 2nd ed ISBN 978 1 85233 801 5 ASIN 1852338016 Shene C K Finding a Point on a Bezier Curve De Casteljau s Algorithm Retrieved 6 September 2012 a b Mark Kilgard April 10 2012 CS 354 Vector Graphics amp Path Rendering p 28 Rida T Farouki Introduction to Pythagorean hodograph curves PDF Archived from the original PDF on June 5 2015 particularly p 16 taxonomy of offset curves For example 1 or 2 For a survey see 3 Richard J Kinch 1995 MetaFog Converting Metafont shapes to contours PDF TUGboat 16 3 Proceedings of the 1995 Annual Meeting Archived PDF from the original on 2022 10 09 a b Farin Gerald 1997 Curves and surfaces for computer aided geometric design 4 ed Elsevier Science amp Technology Books ISBN 978 0 12 249054 5 Neil Dodgson 2000 09 25 Some Mathematical Elements of Graphics Rational B splines Retrieved 2009 02 23 J Sanchez Reyes November 2009 Complex rational Bezier curves Computer Aided Geometric Design 26 8 865 876 doi 10 1016 j cagd 2009 06 003 Alexander Reshetov and David Luebke Phantom Ray Hair Intersector In Proceedings of the ACM on Computer Graphics and Interactive Techniques August 1 2018 4 a b Xuexiang Li amp Junxiao Xue Complex Quadratic Bezier Curve on Unit Circle Zhengzhou China School of Software Zhengzhou University Parts 19 22 of Knuth Donald E 1986 Metafont The Program Addison Wesley ISBN 0 201 13438 1 Zingl Alois A Rasterizing Algorithm for Drawing Curves 2012 http members chello at easyfilter Bresenham pdf Using motion paths in animations Adobe Retrieved 2019 04 11 Following a Spline Synfig Wiki Retrieved 2019 04 11 Dodgson Neil A 1999 Advanced Graphics Lecture Notes PDF cl cam ac uk University of Cambridge Computer Laboratory Archived PDF from the original on 2022 10 09 The difference between CFF and TTF Know How Linotype Archived from the original on 2017 07 03 Retrieved 3 July 2018 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 Bezier 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 smooth curve bezier example file xls Rotating Machinery Analysis Inc Archived from the original on 2011 07 18 Retrieved 2011 02 05 a b Malik Aryslan Henderson Troy Prazenica Richard January 2021 Trajectory Generation for a Multibody Robotic System using the Product of Exponentials Formulation AIAA Scitech 2021 Forum 2016 doi 10 2514 6 2021 2016 ISBN 978 1 62410 609 5 S2CID 234251587 Gross Renan 2014 Bridges String Art and Bezier Curves In Pitici Mircea ed The Best Writing on Mathematics 2013 Princeton University Press pp 77 89 doi 10 1515 9781400847990 011 ISBN 9780691160412 JSTOR j ctt4cgb74 13 Sources Edit Rida T Farouki August 2012 The Bernstein polynomial basis A centennial retrospective PDF Computer Aided Geometric Design 29 6 379 419 doi 10 1016 j cagd 2012 03 001 Paul Bourke 2009 07 19 Bezier Surfaces in 3D Archived from the original on 2009 07 19 Donald Knuth 1986 Metafont the Program Addison Wesley pp 123 131 Excellent discussion of implementation details available for free as part of the TeX distribution Thomas Sederberg Bezier curves PDF Archived from the original PDF on 2006 02 21 Retrieved 2005 09 14 J D Foley et al 1992 Computer Graphics Principles and Practice in C 2nd ed Addison Wesley Rajiv Chandel 2014 03 20 Implementing Bezier Curves in games Further reading EditA Primer on Bezier Curves an open source online book explaining Bezier curves and associated graphics algorithms with interactive graphics Cubic Bezier Curves Under the Hood video video showing how computers render a cubic Bezier curve by Peter Nowell From Bezier to Bernstein Feature Column from American Mathematical Society Bezier curve Encyclopedia of Mathematics EMS Press 2001 1994 Prautzsch Hartmut Boehm Wolfgang Paluszny Marco 2002 Bezier and B Spline Techniques Springer Science amp Business Media ISBN 978 3 540 43761 1 Gallier Jean 1999 Chapter 5 Polynomial Curves as Bezier Curves Curves and Surfaces in Geometric Modeling Theory and Algorithms Morgan Kaufmann This book is out of print and freely available from the author Farin Gerald E 2002 Curves and Surfaces for CAGD A Practical Guide 5th ed Morgan Kaufmann ISBN 978 1 55860 737 8 Weisstein Eric W Bezier Curve MathWorld Hoffmann Gernot Bezier Curves PDF Archived from the original PDF on 2006 12 02 60 pages Ahn Young Joon 2004 Approximation of circular arcs and offset curves by Bezier curves of high degree Journal of Computational and Applied Mathematics 167 2 405 416 Bibcode 2004JCoAM 167 405A doi 10 1016 j cam 2003 10 008 Davies Jason Animated Bezier curves Hovey Chad 20 May 2022 Bezier Geometry GitHub Hovey Chad 2022 Formulation and Python Implementation of Bezier and B Spline Geometry SAND2022 7702C 153 pages External links EditComputer codeTinySpline Open source C library for NURBS B splines and Bezier curves with bindings for various languages C library to generate Bezier functions at compile time Simple Bezier curve implementation via recursive method in Python Retrieved from https en wikipedia org w index php title Bezier curve amp oldid 1173340645, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.