Bézier curve

The Bezier curve [ be'zje ... ] is in the numerical analysis parametrically modeled a curve, which is an important tool for vector graphics.

In computer graphics, Bézier curves are popular because of their geometrical and mathematical elegance ease. A Bezier curve on the screen is, in simple terms, instead of many pixels from a relatively simple formula. In computer graphics, Bézier curves are used to define curves and surfaces in the context of CAD, with vector graphics (eg SVG) and the description of fonts (eg PostScript Type 1, TrueType and OpenType CFF ) was used.

It was independently developed in the early 1960s by Pierre Bézier at Renault and Paul de Casteljau at Citroën for computer -aided design (computer aided design ). Although Paul de Casteljau succeeded in discovering previously, but Citroën stopped his research until the end of the 1960s as a trade secret back.

  • 4.1 Example coordinate quadrant 4.1.1 Error analysis
  • 5.1 genesis
  • 5.2 Projective Space and homogeneous coordinates
  • 6.1 Four Bases
  • 6.2 More than four bases

Definition

A Bezier curve of degree at given control or Bézierpunkten forming the control polygon is called for is defined as

In which

The i-th Bernsteinpolynom n -th degree. These form a basis of the vector space of polynomials and satisfy the recursion formula

For or with, as well. This allows for a numerically stable recursive calculation of the values ​​of a Bezier curve using the De Casteljau algorithm:

Properties

  • The curve lies within the convex hull of the control polygon. This follows from the fact that the Bernstein polynomials of degree n is a partition of unity:
  • The curve passes exactly through the endpoints and:
  • The tangents at the endpoints run along the edges or the control polygon:
  • The first summand of Taylorpolynoms at or in noisy for:
  • A straight line a Bezier curve intersects at most as many times as it cuts its control polygon (the curve is reducing variation, or has a limited variation ).
  • An affine transformation ( translation, scaling, rotation, shear) can be applied to the Bezier curve by transforming the control polygon ( " affine invariance ").
  • If all control points on a straight line, then the Bezier curve at a distance (an advantage over the polynomial interpolation ).
  • The influence of a control point on the curve is global. That means: If you move a point, the entire curve changes. Therefore, we used in practice usually splines, composite curves fixed degree, which merge into each other continuously.
  • A Bezier curve can always be divided into two Bezier curves of the same order, which results in the new control points from the previous points. Here, the separation point of the parameter depends. From the illustration for the construction of a Bezier curve can be seen that the new curve is composed of the first control points, while the second consists of the curve points. This property can be used to approximate a curve with the aid of recursive de Casteljau algorithm by straight lines.

As a generalized form of the Bezier curve the Bézierfläche can be seen. A Bézierfläche -order is a surface of the form

With the control points and the Bernstein polynomials and.

A Bézierfläche can thus be described by two mutually orthogonal Bezier curves.

Bezier curves to the third degree

Linear Bezier curves ( n = 1)

Two control points determine a straight line between these two points. The course of this linear Bézier " curve " is given by

Quadratic Bezier curves ( n = 2)

A quadratic Bézier curve is the path traced by the function for the points and:

With the help of the de Casteljau algorithm expressed:

The lines and the edges of the control polygon ( gray lines in the adjacent animation). The set of curves corresponds with the green lines in the animation. The evaluation at the points represents the course of the Bezier curve at: .

Cubic Bezier curves ( n = 3)

Cubic Bezier curves are, in practice, of great importance, since both B- spline curves, and NURBS are piecewise cubic Bezier curves converted into, only to be drawn efficiently with the de Casteljau algorithm. The same applies to Hermitian splines that are used in its cubic form, especially in computer animation interpolation between keyframes.

With the help of the de Casteljau algorithm expressed:

The routes and as well as the edges of the control polygon ( gray lines in the adjacent animation). The two sets of curves and correspond with the green lines in the animation.

The set of curves corresponds with the blue lines in the animation. The evaluation at the points represents the course of the Bezier curve at: .

Cubic Bézier representation of quadratic

If you choose the middle Bézier points and a cubic Bezier curve as follows

One obtains a curve that corresponds exactly to the quadratic Bezier curve with the points and:

This can be even quadratic Bezier curves represent, if a vector drawing program ( eg Inkscape ) or a graphics library (eg Cairo ) only cubic supported.

Application: circular approximation by cubic Bezier curves

Circles or circular arcs by Bézier curves can be not exact, but represent only approximately. Such an approximation is, for example, for the design of a Type 1 PostScript font needed, since only lines and Bezier curves are third-degree allowed. (However runs for larger no Bezier curve of degree in an ever so small arc of a circle with radius to the center, because that then lies on the circular arc when zero of the polynomial function of degree, which happens at most times -. Cf. error analysis)

If you divide a circle into two ( equal ) segments and approaches the semicircles by cubic Bezier curves, larger deviation from the circular shape show. Through a finer subdivision into more segments, a circle can be better approach. The smaller the angle swept area of the circular segment, the more accurate the approximation by the Bezier curve. A frequently used, simple realization of a circle using four quarter-circle arcs, which are represented as cubic Bezier curves. To demonstrate the improvement of approximation by refining the partitioning, the error of the Halbkreisapproximation Viertelkreisapproximation and be compared with each other in the sequence.

Notation: We study approximations of a circle with the following parameters:

  • Is the radius of
  • Is the center of
  • The control points and are at a distance away from the center (ie on the circle of )
  • Is a real number between 0 and 1 ( equivalent to a square Bézierapproximation ).

The additional control points are selected so that the distance to and has.

Example coordinate quadrant

As a simple example of a Viertelkreisapproximation we choose:

  • The center of the circle as,
  • The control point on the circle line as,
  • The control point on the circle as - the route is therefore perpendicular, so that both routes form a quarter-circle sector -
  • The checkpoint as (on the route )
  • The checkpoint as (on the route ).

The cubic Bezier curve () has with these control points of the form:

A fairly good approximation of the upper right quadrant arc is replaced with one, as the following consideration shows.

Error Analysis

The deviation of just given Bezier curve from the circle to be displayed can be quantified as follows:

A point of the Bezier curve if and only lies on the given circle with radius around the center if ( " Cartesian equation " ) applies. If we define

Thus, the equivalent to. is a measure of the deviation of the approximation from the circular shape.

It then calls the conformity of the Bezier curve with the circle at the angle bisector, one obtains

The error is zero at, otherwise everywhere positive, that is, the Bezier curve always lies on or outside the arc. The maximum error is at and at.

If one requires that the accumulated error over the entire curve disappear ( may be positive or be negative - the Bezier curve runs partly outside and partly inside the circle - and the integral above can give zero ), one obtains

The largest deviations are around and when. Both approximations are thus sufficient for many applications.

Example coordinates semicircle

Cracked Rational Bezier curve

Cracked Rational Bézier curves can be simplified regarded as Bezier curves whose control points with weights / attraction are provided and thus influence the curve in their direction.

The designation as a fractional rational Bezier curves arises probably from the formula display frequently called

The presentation as a quotient, as well as the simplistic notion of the function of the weights, but can easily lead to a misunderstanding of the relationships.

Genesis

Multiplication of the control point ( position vectors ) and their associated weights, as can be seen in the above formula presentation does not correspond to a simple scaling of the position vectors, but a transformation of coordinates in the projective space - result of the multiplication is therefore the position vector, which is represented, in homogeneous coordinates. After the transformation in the projective space, the curve is generated at the normal law of formation, and then transformed back into the original space back, which is practically obtained by dividing.

Projective space and homogeneous coordinates

The projection of the control points in the projective space by means of its weights changed in general ( ie if not all weights are equal to 1 ) the position of the control points to each other, so distorts the control polygon. This distortion affects like this now that the curve at the points with higher weighting approaches more back in the transformed representation.

121900
de