This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

BezierCurve

BezierCurve
is a graphics primitive that represents a Bézier curve with control points .
  • The positions of control points can be specified either in ordinary coordinates as or , or in scaled coordinates as Scaled or Scaled.
  • BezierCurve by default represents a composite cubic Bézier curve.
  • SplineDegree->d specifies that the underlying polynomial basis should have maximal degree d.
  • With SplineDegree->d, BezierCurve with d+1 control points yields a simple degree-d Bézier curve. With fewer control points, a lower-degree curve is generated. With more control points, a composite Bézier curve is generated. »
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:
A Bézier curve and its control points in 2D:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
A Bézier curve and its control points in 3D:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
A composite Bézier curve and its control points:
In[5]:=
Click for copyable input
In[6]:=
Click for copyable input
Out[6]=
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:
Bézier curves with different thicknesses:
Thickness in scaled size:
Thickness in printer's points:
Dashed curves:
Colored curves:
Use Scaled coordinates:
Use ImageScaled coordinates in 2D:
Use Offset coordinates in 2D:
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:
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:
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:
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:
Linear transition from one Bézier curve to another:
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, we 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:
A simple Bézier curve editor:
A random collection of cubic Bézier curves:
A composite Bézier flower:
New in 7