|
Bézier segment
The first descendant of the base CXMMGeometry class is a qubic segment.
Qubic segment in Ferguson representation

Given the two control points r0 and r1, and the slopes of the tangents
r'(0) and r'(1) at each point, we can define a parametric cubic curve
that passes through r0 and r1, with the respective slopes r'(0) and
r'(1) by equating the coefficients of the polynomial function

with the values above. Namely

Solving these equations simultaneously for a0, a1, a2 and a3, we obtain

Substituting these into the original polynomial equation and
simplifying to isolate the terms with r(0), r(1), r'(0), r'(1), we have

This can be rewritten in the following matrix form

Each segment in Ferguson representation is specified by the position
and tangent vectors at the segment joints.
Qubic segment in Bézier representation
Bézier regrouped the Ferguson representation of qubic curve to make
the sense of vector coefficents more clear. The most important Bézier
curves, the cubic ones, are widely used in computer graphics.

Four points r0, r1, r2 and r3 in the plane or in three-dimensional
space define a cubic Bézier curve. The curve starts at r0 going
towards r1 and arrives at r3 coming from the direction of r2.
In general, it will not pass through r1 or r2; these points are
only there to provide directional information. The distance between
r0 and r1 determines "how long" the curve moves into direction r1
before turning towards r3.

Bézier curves are widely used in computer graphics because :
affine maps (such as translation, scaling and rotating) on a
Bézier curve can be done simply by applying the operation to
the control points
understandable meaning of points r1 and r2 while editing curve
shape e.g. with a mouse cursor
Complicated curves are made up of segments. If the first segment has
control points r0, r1, r2, and r3, the second has control points
r3, r4, r5, and r6, and if C1 continuity (i.e. smoothness of the curve)
at r3 is required, then the direction of r2-r3 needs to be equal to
the direction of r3-r4.

|