Lecture 6 Spline
Lecture 6 Spline
Several small weights are distributed along the length of the strip to hold it in
position on the drafting table as the curve is drawn.
A spline surface can be described with two sets of orthogonal spline curves.
There are several different kinds of spline specifications that are used in graphics
applications.
3. To specify Animation paths for the objects for the camera in a scene.
4. Typical CAD applications for splines include the design automobile bodies.
Interpolation spline
Approximation spline
Interpolation
Designer can then reposition some or all of the control points to restructure
the shape of the curve.
CAD packages can also insert extra control points to aid a designer in
adjusting the curves shapes.
Convex hull
Given a set of pins on a pinboard
And a rubber band around them
How does the rubber band look when it snaps tight?
Some splines are bounded by the convex hull, thus ensuring that the
polynomials smoothly follow the control points without erratic
oscillations.
The polygon region inside the convex hull is useful in some algorithms as a
clipping region.
Convex hull Cont’d….
Control graph
A polyline connecting the sequence of control
points for an approximation spline is usually
displayed to remind a designer of the control-
point ordering.
x=x(u) u 1 ≤ u ≤ u2
functions of the form
y=y(u)
z=z(u)
Parametric Continuity Conditions
3. Second-order parametric continuity, or C2 continuity, means that both the first and
second parametric derivatives of the two curve sections are the same at the
intersection.
d 2u
dx
• With second-order continuity the rates of change of the
tangent vectors for connecting sections are equal at their
intersection.
2. First-order geometric continuity, (or G1 continuity), means that the parametric first
derivatives are proportional at the intersection of two successive sections.
3. Second-order geometric continuity, or( G2 continuity) means that both the first and
second parametric derivatives of the two curve sections are proportional at their
boundary
Difference
There are three equivalent methods for specifying a particular spline representation
We can state the set of boundary conditions that are imposed on the spline.
we can state the matrix that characterizes the spline.
we can state the set of blending functions (or basis functions) that determine how
specified geometric constraints on the curve are combined to calculate positions
along the curve path.
Spline Specifications-set of boundary conditions
x(u ) a x u 3 bx u 2 c x u d ....................(22.1) 0 u 1
• These four boundary conditions are sufficient to determine the values of the four
coefficients ax, bx, cx and dx by x(0), x(1), x’(0), x’(1).
Spline Specifications- the matrix
ax
b
3
2
x(u ) u , u , u ,1 . x
cx
u.c
dx
• where U is the row matrix of powers of parameter u, and C is the coefficient column matrix.
c M spline .M geom
• Where, Mgeom is a four-element column matrix containing the geometric constraint values (boundary
conditions) on the spline.
• Mspline is the 4-by-4 matrix that transforms the geometric constraint values to the polynomial
coefficients.
Spline Specifications- the Blending Function
• Finally, we can expand the eq. to obtain a polynomial representation for coordinate x
in terms of the geometric constraint parameters
•
3
x(u ) gk 0
k BFk (u )
• where gk are the constraint parameters, such as the control-point coordinates and
slope of the curve at the control points,
• BFk(u)are the polynomial blending functions.
Cubic spline interpolation methods
Used to set up paths for object motions or to provide a representation for an existing object
or drawing.
But interpolation splines are used to design object shapes.
• Given a set of control points, interpolation splines are obtained by fitting the input
points with a piecewise cubic polynomial curve that passes through every control
point.
• Suppose we have n + 1 control points specified with Coordinates:
pk ( xk , y k , z k ) k 0,1,2,...., n
• We can describe the parametric cubic polynomial that is to be fitted between each
pair of control points with the following set of equations:
x(u ) a x u 3 bx u 2 c x u d x
3 2 0 u 1
y (u ) a y u b y u c y u d y
z (u ) a z u 3 bz u 2 c z u d z
Natural Cubic Splines
• The two curve sections on either side of a control point must have the same first and
second
• parametric derivatives at that control point, and each curve must pass through that
control point
Natural Cubic Splines
• We get an additional equation from the first control point p0, the position of the
beginning of the curve, and another condition from control point pn , which must be
the last point on the curve.
• We still need two more conditions to be able to determine values for all coefficients.
• One method for obtaining the two additional conditions is to set the second
derivatives at p0 and pn equal to 0.
• Another approach is to add two extra "dummy" control points, one at each end of
the original control-point sequence.
• That is, we add a control point p-I and a control point p n+1 ,
• Then all of the original control points are interior points,
• and we have the necessary 4n boundary conditions.
disadvantage
• If the position of any one control point is altered, the entire curve is affected.
• Thus, natural cubic splines allow for no "local control",
• so that we cannot restructure part of the curve without specifying an entirely new set
of control points.
Hermite Interpolation
• Cardinal splines are interpolating piecewise cubics with specified endpoint tangents at
the boundary of each curve section.
• The difference is that we do not have to give the values for the endpoint tangents
• For a cardinal spline, the value for the slope at a control point is calculated from the
coordinates of the two adjacent control points
Cardinal splines
• A cardinal spline section is completely specified with four consecutive control points.
• The middle two control points are the section endpoints, and the other two points are
used in the calculation of the endpoint slopes.
• Parameter t is called the tension parameter since it controls how loosely or tightly the
cardinal spline fits the input control points.
• Developed by the French engineer Pierre Bezier in 1960s for use in the design
of Renault automobile bodies curve and surface design.
• Easy to implement.
• For these reasons, Bezier splines are widely available in various CAD systems, in
general graphics packages (such as GL on Silicon Graphics systems), and in
assorted drawing and painting packages (such as Aldus Super paint and Cricket
Draw)
• Can be fitted to any number of control points
• The number of control points to be approximated and their relative
position determine the degree of the Bezier polynomial.
• Bezier curve can be specified with boundary conditions, with a
characterizing matrix, or with blending functions
Bezier Curves
• As a rule, a Bezier curve is a polynomial of degree one less than the number of control
points used
• Three points generate a parabola, four points a cubic curve, and so forth
• Bezier curves are commonly found in painting and drawing packages, as well as CAD
systems, since they are easy to implement and they are reasonably powerful in curve
design
Properties of Bezier Curves
• the slope at the beginning of the curve is along the line joining the first
two control points,
• and the slope at the end of the curve is along the line joining the last two
endpoints.
Properties of Bezier Curves
• Similarly, the parametric second derivative of a Bezier curve at the endpoints are calculated as
• Refer book
• it lies within the convex hull (convex polygon boundary) of the control points.
Design Techniques Using Bezier Curves
• Closed Bezier curves are generated by specifying the first and last control points at the same
position
• specifying multiple control points at a single coordinate position gives more weight to that position
Design Techniques Using Bezier Curves
• We can fit A Bezier curve to any number of control points, but this requires the calculation of
polynomial functions of higher degree
• When complicated curves are to be generated, they can be formed by piecing several Bezier
sections of lower degree together
• piecing together smaller sections also gives us better control over the shape of the curve in small
regions.
B-spline curves and surfaces