BezierCurve

BezierCurve[{pt1,pt2,}]

is a graphics primitive that represents a Bézier curve with control points pti.

Details and Options

Examples

open allclose all

Basic Examples  (1)

A Bézier curve and its control points in 2D:

A Bézier curve and its control points in 3D:

A composite Bézier curve and its control points:

Scope  (11)

Curve Specification  (4)

A single cubic Bézier curve:

A composite Bézier curve:

Bézier curves of different degrees:

By default, a Bézier curve is open:

A closed Bézier curve automatically adds the first control point at the end:

Curve Styling  (4)

Bézier curves with different thicknesses:

Thickness in scaled size:

Thickness in printer's points:

Dashed curves:

Colored curves:

Coordinate Specification  (3)

Use Scaled coordinates:

Use ImageScaled coordinates in 2D:

Use Offset coordinates in 2D:

Generalizations & Extensions  (3)

A single Bézier curve with degree d requires d+1 control points:

With fewer control points, a lower-degree curve is generated:

With more control points, a composite Bézier curve is generated:

Applications  (7)

Graphics, Glyphs, etc.  (4)

Approximate a circle with 4 Bézier curves:

A quadratic Bézier curve can be converted into a cubic Bézier curve:

Define the outline of a glyph:

Draw a tree plot:

Use BezierCurve instead of lines to draw the edges:

Interpolation  (1)

Choose 4 points to be interpolated:

Compute distances between control points:

Compute normalized parameters with respect to the distances (chord length parametrization):

Since a Bézier curve interpolates endpoints, you only need to compute two intermediate points:

The formula for the interpolating Bézier curve:

Solve the equations:

Show the interpolating curve:

Least Squares Fitting  (1)

Generate a list of points to be approximated:

Fit to a cubic Bézier curve, using Bernstein polynomials:

Show the data with the curve:

Construct control points from the coefficients:

Show the data with the curve:

Geometric Invariances  (1)

Linear transition from one Bézier curve to another:

Properties & Relations  (11)

A Bézier curve always interpolates the endpoints:

A Bézier curve with degree 1 is equivalent to Line:

A Bézier curve is affine invariant:

A single Bézier curve lies in the convex hull of the control points:

In 3D, a Bézier curve with planar control points lies in the plane:

The cubic Bernstein polynomials:

A Bézier curve can be constructed from the sum of the Bernstein polynomials:

A Bézier curve generated from the average of two sets of control points:

The new curve is indeed the average of two Bézier curves:

A composite Bézier curve may not be smooth at the point where two segments meet:

By making the adjacent points collinear, you can get a smooth composite Bézier curve:

A single BezierCurve is a special case of BSplineCurve:

In 3D, a single Bézier surface patch can be generated using BSplineSurface:

The boundaries of the surface form Bézier curves:

Interactive Examples  (1)

A simple Bézier curve editor:

Neat Examples  (2)

A random collection of cubic Bézier curves:

A composite Bézier flower:

Wolfram Research (2008), BezierCurve, Wolfram Language function, https://reference.wolfram.com/language/ref/BezierCurve.html.

Text

Wolfram Research (2008), BezierCurve, Wolfram Language function, https://reference.wolfram.com/language/ref/BezierCurve.html.

CMS

Wolfram Language. 2008. "BezierCurve." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/BezierCurve.html.

APA

Wolfram Language. (2008). BezierCurve. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BezierCurve.html

BibTeX

@misc{reference.wolfram_2024_beziercurve, author="Wolfram Research", title="{BezierCurve}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/BezierCurve.html}", note=[Accessed: 12-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_beziercurve, organization={Wolfram Research}, title={BezierCurve}, year={2008}, url={https://reference.wolfram.com/language/ref/BezierCurve.html}, note=[Accessed: 12-October-2024 ]}