3. Curves Bezier

Bezier curves are widely used in computer graphics to simulate smooth lines. The curve is entirely in the convex hull of its reference points. This feature of Bezier curves allows you to intuitively control the curve parameters in a graphical interface using its reference points. In addition, the affine curve transformation (transfer, scaling, rotation, etc.) can also be accomplished by applying appropriate transformations to the reference points.

Of greatest importance are Bezier curves of the second and third degrees (quadratic and cubic). For the construction of complex lines of form, separate Bezier curves can be sequentially connected to each other in the split Bezier. In order to ensure the smoothness of the line at the junction of the two curves, three adjacent reference points of both curves should lie in one straight line.

In vector graphics programs like Adobe Illustrator or Inkscape such pieces known as "Way» ( path ). In modern graphic systems and formats, such as PostScript (as well as Adobe Illustrator and Portable Document Format ( PDF ) formats based on it ), Scalable Vector Graphics ( SVG ), Metafont , CorelDraw, and GIMP for representing curvilinear shapes are used. Bezier splines are composed of cubic curves

Linear curves

When n = 1, the curve represents a segment of a straight line, the reference points P0 and P1 determine its beginning and end. The curve is given by the equation:

                       

The parameter t in the function that describes the linear case of the Bezier curve determines where exactly at a distance from P0 to P1 is B (t). For example, at t = 0,25 the value of the function B (t) corresponds to a quarter of the distance between the points P0 and P1. The parameter t varies from 0 to 1, and B (t) describes the line segment between the points P0 and P1.

Quadratic curves

The Bezier quadratic curve (n = 2) is given by three reference points: P0, P1 and P2.

 

Quadratic Bezier curves in splines are used to describe character form in TrueType fonts and in SWF files.

To construct the Bezier quadratic curves, it is necessary to select two intermediate points Q0 and Q1 from the condition that the parameter t varies from 0 to 1:

The point Q0 varies from P0 to P1 and describes the Bezier curve.

The point Q1 varies from P1 to P2 and also describes the Bezier curve.

Point B varies from Q0 to Q1 and describes the Bezier curve.

Cubic curves

In the parametric form, the Bezier cubic curve (n = 3) is described by the equation:

 

Four reference points P0, P1, P2 and P3 given in the 2- or 3-dimensional space determine the shape of the curve. Line takes origin from P0 pointing to P1 and ends at P3 pointing to it from P2. That is, the curve does not pass through points P1 and P2, they are used to indicate its direction. The length of the segment between P0 and P1 determines how soon the curve returns to P3.

In the matrix form, the Bezier cubic curve is written as follows:

where

where it is called the base Bezier matrix.

To construct higher-order curves, more intermediate points are needed. For a cubic curve, these are intermediate points Q0, Q1 and Q2 describing linear curves, as well as points R0 and R1 that describe quadratic curves.

       

       

       

Properties of the Bezier curve

  • Continuity of filling segment between initial and final points;
  • the curve always lies inside the figure formed by the lines connecting the control points;
  • in the presence of only two control points, the segment represents a straight line;
  • Bezier curve is symmetric, that is, the exchange of places between the initial and the endpoints (changing the direction of the trajectory) does not affect the shape of the curve;
  • Zooming and changing the proportions of the Bezier curve does not violate its stability, since it is "affinously invariant" from a mathematical point of view;
  • changing the coordinates of at least one of the points leads to a change in the shape of the entire Bezier curve;
  • the degree of the curve is always one step lower than the number of control points, for example, at three control points the shape of the curve - a parabola;
  • the circle can not be described by the parametric equation of the Bezier curve;
  • it is impossible to create parallel Bezier curves, except in trivial cases.
Accessibility

Font Face Font Face

Font Size Font Size

1

Text Colour Text Colour

Background Colour Background Colour

Font Kerning Font Kerning

Image Visibility Image Visibility

Letter Spacing Letter Spacing

0

Line Height Line Height

1.2

Link Highlight Link Highlight