Bézier spline
Encyclopedia
In the mathematical
Mathematics
Mathematics is the study of quantity, space, structure, and change. Mathematicians seek out patterns and formulate new conjectures. Mathematicians resolve the truth or falsity of conjectures by mathematical proofs, which are arguments sufficient to convince other mathematicians of their validity...

 field of numerical analysis
Numerical analysis
Numerical analysis is the study of algorithms that use numerical approximation for the problems of mathematical analysis ....

 and in computer graphics
Computer graphics
Computer graphics are graphics created using computers and, more generally, the representation and manipulation of image data by a computer with help from specialized software and hardware....

, a Bézier spline is a spline curve where each polynomial of the spline is in Bézier form.

In other words, a Bézier spline is simply a series of Bézier curve
Bézier curve
A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case....

s joined end to end where the last point of one curve coincides with the starting point of the next curve. Usually cubic Bézier curves are used, and additional control points (called handles) are added to define the shape of each curve.

Definition

Given a spline S of degree n with k knots xi we can write the spline as a Bézier spline as:

Approximating circular arcs

In case circular arc primitives are not supported in a particular environment, they may be approximated by Bézier curve
Bézier curve
A Bézier curve is a parametric curve frequently used in computer graphics and related fields. Generalizations of Bézier curves to higher dimensions are called Bézier surfaces, of which the Bézier triangle is a special case....

s. Commonly, four cubic segments are used to approximate a circle. It is desirable to find the length of control points which result in the least approximation error.

Using four curves

Considering only the 90-degree unit-circular
Unit circle
In mathematics, a unit circle is a circle with a radius of one. Frequently, especially in trigonometry, "the" unit circle is the circle of radius one centered at the origin in the Cartesian coordinate system in the Euclidean plane...

 arc in the first quadrant, we define the endpoints and with control points and , respectively, as:

From the definition of the cubic Bézier curve, we have:

With the point as the midpoint of the arc, we may write the following two equations:

Solving these equations for the x-coordinate (and identically for the y-coordinate) yields:

General case

We may compose a circle of radius from an arbitrary number of cubic Bézier curves.
Let the arc start at point and end at point , placed at equal distances above and below the x-axis, spanning an arc of angle :
The control points may be written as:
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK