Fig Piecing together Bezier curve segments

Two Bezier curve segments can be constructed to have CO and C1 continuity if we can ensure that they share a join point (P4) and the tangent vectors at P4 are equal or P5 - P4 = P4 - P3 as shown in Fig.7.5. Try to define another Bezier segment and connect it to the segment we defined in Example7_1. How will you define the control points to achieve CO continuity? To achieve CI and C2 continuity?

One can approximate entire curves by assembling Bezier curve segments in this manner. For more complex curves, the mathematics to ensure C1 continuity across the curve while adjusting control points gets tricky. A better solution is provided by splines and by what we call Nurbs.

Spline curves originated from flexible strips used to create smooth curves in traditional drafting applications. Much like Bezier curves, they are formed mathematically from piecewise approximations of cubic polynomial functions.

B-Splines are one type of spline that is perhaps the most popular in computer graphics applications. The control points for the entire B-spline curve are defined in conjunction. They define C2 continuous curves, but the individual curve segments need not pass through the defining control points. Adjacent segments share control points, which is how the continuity conditions are imposed. For y(t)

Opengl Spline Tuto

B-Splines this reason, when we discuss splines, we discuss the entire curve (consisting of its curve segments) rather than its individual segments which must then be stitched together. Cubic B-splines are defined by a series of (m=n+1) control points: Pq, Py...Pn

Each curve segment of the spline Q{ 3 < i < n is defined by the four control points P ¡^J' ¡- \

For example, in Fig.7.6, we show a spline with m=8 control points. The individual segments of the curve are Q3, £>4, Qg and Q-j. Q3 is defined by the four control points, P{yP^y(}^ by points /J| -P4 ctc.

Conversely, every control point affects four segments. For example, in the

Spline Uniforme

Fig.7.6: A uniform nonrational B-spline

Fig.7.6: A uniform nonrational B-spline above figure, point P4 affects segments £>3, Q^, Q^, and Q(y Moving a control point will affect these four segments but will not affect the entire curve. This is a very useful property of B-splines that we shall look into more in the next few chapters.

The join points between the segments are called knots. The knot between segment i and i+1 is represented as k-r The initial point of the first segment and the endpoint of the last segment are also called knots, so there is a total of («-1) knots for the spline under consideration. When knots are uniformly placed, as shown in Fig.7.6, the curve spline is called a uniform non-rational spline. Unfortunately, it is difficult to define and control the splines since the segments do not interpolate the control points.

Non-uniform non-rational B-splines define («+5) knots. The knots need not be uniformly spaced—and in fact are user defined. The advantage is that we can force the curve to interpolate certain control points. Non-uniform B-splines uses the notion of knot value sequences: a non-decreasing sequence of knot values that defines the placement of knots of the curve. For example, if we assumed the curve above was a non-uniform non rational B spline, its knot sequence would effectively be (0,1,2,3,4,5,6,7,8,9,10,11). («+5 = 12 knots)

If successive knot values are equal in the sequence, it is called a multiple knot. Multiple knots causes the curve to approximate the associated control point more closely. In fact, three successive knot values forces the curve to actually interpolate the control point, thereby making the shape of the curve easier to define. Defining multiple knots does lead to a loss in continuity, but only at the associated control point. If we modified our curve above to assume a different knot sequence, the results would appear as shown in Fig.7.7.

0 0

Post a comment

  • Receive news updates via email from this site