7 curvesbspline rev 2
TRANSCRIPT
-
8/2/2019 7 CurvesBSpline Rev 2
1/53
B Spline Curve
ME C382: COMPUTER AIDED DESIGN
-
8/2/2019 7 CurvesBSpline Rev 2
2/53
Splines - History
Draftsman
A Duck (weight)
Ducks trace out curve
knot
strips of wood (splines)
-
8/2/2019 7 CurvesBSpline Rev 2
3/53
Why more spline lectures?
Because B-spline can offer somethingmore than HCC and Bezier curve.
Bezier and Hermite splines have global
control only.Moving one control point affects the entire
curve
B-spline consists of a basisthat allows anextra degree of freedom which is thedegree of the curve. Degree of the curve
can be independent of the number ofcontrol points.
Hence Local control is available
-
8/2/2019 7 CurvesBSpline Rev 2
4/53
B-Spline VersusBezier curve
B-Spline is a powerful generalization of theBezier curve
B-Spline can be both interpolating type andapproximating type
B-Spline provides local control thus better shapecontrol is possible
-depedent on the number control points; thuswith four control points, quadratic as well ascubic B-Spline curves are possible
In general, with (n+1) control points, B-Splinecurves of any degree upto n are possible.
-
8/2/2019 7 CurvesBSpline Rev 2
5/53
-
8/2/2019 7 CurvesBSpline Rev 2
6/53
Parametric representation of B-Spline Curves
functionsbasisSpline-B)(
0)(
,
0
max,
=
==
uN
uuuN(u)
ki
n
i
kiiiiiPPPPPPPP
parametertheofvalueMaximum
ParametercurveSpline-BtheofDegree)1(
max =
=
=
u
uk
-
8/2/2019 7 CurvesBSpline Rev 2
7/53
Special characteristics of B-Spline equation
The control points (called de-Boor points)form the vertices of the control polygon(called de-Boor polygon)
The second parameter in the basisfunctions, k, controls the degree (k-1) ofthe resulting B-Spline curve and is
n epen en o e n+ ; n y e upperlimit of the degree is decided by the (n+1)
The maximum limit of the parameter is no
longer unity (that is 1); it is umax chosen byfixing the (n+1) and (k-1)
-
8/2/2019 7 CurvesBSpline Rev 2
8/53
Properties of B-Spline Curve
Partition of Unity: Enables invariance under affinetransformations.
1)(0
, ==
n
i
ki uN
Positivity: Enables the curve to lie entirelyin its convex hull.
0)(, uN ki
-
8/2/2019 7 CurvesBSpline Rev 2
9/53
Properties of B-Spline Curve
Local support: Enables local control.
],[if0)( 10
, ++
=
=kii
n
i
ki uuuuN
Continuity: Enables continuity thecontinuity of different levels, C0, C1, C2 etc.
able.differentiycontinousl2)-(kis0)(, uN ki
-
8/2/2019 7 CurvesBSpline Rev 2
10/53
Meaning of these characteristics
Partition of unity ensures that therelationship between the curve and itsdefining control points is invariant under
affine transformations. affine transformation - a transformation
h i m in i n f in l
transformations such as translation orrotation or reflection on an axis
Transformation - a function that changesthe position or direction of the axes of acoordinate system
-
8/2/2019 7 CurvesBSpline Rev 2
11/53
Positivity property guarantees that the
curve segment lies completely within theconvex hull of Pi.
Local support property indicates that each
segment of a B-Spline curve is influencedby only k control points or each control
.
Continuity property tells us about the fact
that B-Spline curve segment is continuousupto Ck-2 or Cn-1 (where (n+1)=number ofcontrol points) within the segment itself.
-
8/2/2019 7 CurvesBSpline Rev 2
12/53
-
s.knot valueorknotsparametriccalledareThe
zero.becomersdenominatoif000Choose
function.stepunitaisThis,0
,1
)(
)()(
)(
)()()(
1
1,
1
1,1
1
1,
,
=
=
+
=
+
++
+
+
+
u
otherwise
uuuN
where
uu
uNuu
uu
uNuuuN
i
ii
i
iki
ki
ki
iki
ki
iki
ertyofB-Spline
)2(0isofrangetheand
,2
,1,0
curve,openanFor
.(periodic)closed
orperiodic)-(nonopeniscurveSpline-Btheon whetherdependtheofvaluesThe
+
>+
+
0
n+1 + 1-k >0
(k-1) < (n+1)
(k-1) n
This relation says that a minimum of two, threeand four control points are required to define alinear, quadratic and cubic B-Spline curverespectively.
-
8/2/2019 7 CurvesBSpline Rev 2
15/53
Properties of B-spline Curves:O en Curves
-
8/2/2019 7 CurvesBSpline Rev 2
16/53
Since Ni,1(u) is a constant for k=1, a generalvalue of k produces a polynomial in u of
degree (k-1) and therefore a curve of degree(k-1).
The knot values are essential for obtaining the
parametric equation of degree (k-1) for thecurve. Once the parametric equation isdetermined, the point on the curve
max,
be determined by substitution. Thus it is veryessential to understand the purpose of the knotvalues (which are discrete and finite in
number, precisely n+k+1) and the variation ofthe parameter (which is continuous betweenthe limits of 0 and umax along the curve).
-
8/2/2019 7 CurvesBSpline Rev 2
17/53
The local control of B-Spline
The local control of B-Spline curve can beobtained by three ways:
1)By changing the position of the controlpoint(s). Moving any one control point willaffect only k number of curve portions
symmetrically around it.2)Using multiple control points by placing
several points at the same location
3)By choosing a different degree, (k-1).
-
8/2/2019 7 CurvesBSpline Rev 2
18/53
changing the position of the control point
The curve is cubic
-
8/2/2019 7 CurvesBSpline Rev 2
19/53
Increasing the degree of the curve tightens it.The lesser the degree of the curve the closer the
curve gets to the control points.(k 1) = 0 -> Zero degree curve (control
points themselves)
(k 1) = 1 -> First degree curve (controlpolygonal segments themselves)
(k 1) = 2 -> Second degree curve
qua rat c curve .(k 1) = 3 -> Third degree curve (cubic
curve)
(k 1) = 4 -> Fourth degree curve (quarticcurve)
(k 1) = 5 -> Fifth degree curve (quinticcurve)
-
8/2/2019 7 CurvesBSpline Rev 2
20/53
The quadratic curve is always tangent to
the midpoints of all the internal polygonsegments. This is not the case for otherdegrees. (k-1)=2
(k-1)=3
(k-1)=5
-
8/2/2019 7 CurvesBSpline Rev 2
21/53
Equivalence of B-Spline and Bezier curves
If k equals the number of control points (n+1),then the resulting B-Spline curve becomes aBezier curve. As expected, u varies from 0 to 1in this case.
Multiple control points induce regions of highcurvature of a B-Spline curve
Wh n m l i li i n in i l k-1 h
curve has a cusp or a sharp corner. When themultiplicity at any control point is k, then the B-Spline curve will pass through it (why? see next
slide). But Ck-2
continuity is maintained in bothcases.
Multiplicity of points maintains the degree of thecurve but the knot vector is changed.
-
8/2/2019 7 CurvesBSpline Rev 2
22/53
Changing one control point affects only k
curve portions symmetrically around it (wedefine one portion of curve as equivalentlength on the curve to one control
polygonal segment. We have reserved theterm curve segment to mean one entires line .
In other words, each portion (or a point init) is influenced by only k number of controlpoints surrounding it (This is the key
behind the procedure of finding the convexhull of a B-Spline curve).
-
8/2/2019 7 CurvesBSpline Rev 2
23/53
Finding convex hull for a B-SplineSince each portion (and any point on it) of
the curve is influenced by k number ofcontrol points the convex hull of a B-Splinefor specified degree (k-1) is obtained byfirst joining k number of control points ata time repeatedly from first to the last in
the control point set. This results in a setof convex hulls. Then, finally the convexhull of the entire B-Spline curve is
obtained as the union of these miniconvex hulls.
-
8/2/2019 7 CurvesBSpline Rev 2
24/53
When k-1=2, k=3 andhence take 3 points at atime
-
8/2/2019 7 CurvesBSpline Rev 2
25/53
A non-periodic B-Spline curve passesthrough the first and last control points Poand P
n
and is tangent to the first (P1
- Po
)and last (Pn Pn-1) control polygonalsegments, similar to the Bezier curve.
-
8/2/2019 7 CurvesBSpline Rev 2
26/53
THE RECURSIVE AND NON-RECURSIVE PARTS OF BASIS FUNCTION EQUATIONS
Consider a cubic B-Spline for five control points.
P(u)=P0
N0,4
(u)+P1
N1,4
(u)+P2
N2,4
(u)+P3
N3,4
(u)+P4
N4,4
(u)
N0,4(u) N1,4(u) N2,4(u) N3,4(u) N4,4(u)
N0,3(u) N1,3(u) N2,3(u) N3,3(u) N4,3(u) N5,3(u)
0,2 u 1,2 u 2,2 u 3,2 u 4,2 u 5,2 u 6,2 u
N0,1(u) N1,1(u) N2,1(u) N3,1(u) N4,1(u) N5,1(u) N6,1(u) N7,1(u)
Optical illusion notwithstanding, this picture shows that oneadditional basis function needs to be evaluated at each lower levelusing the recursive relation except the last level Ni,1 which isevaluated using the unit step function part of basis function
equations.
-
8/2/2019 7 CurvesBSpline Rev 2
27/53
Find the complete parametric equation of the quadratic B-Splinecurve with the above given control points.
-
8/2/2019 7 CurvesBSpline Rev 2
28/53
General Matrix form for any k value
[ ]
[ ]1][
2:][]][[)(
21=
+=
uuuU
kniiPMUuP
kk
ksi
L
[ ]2:1][][ += kiijPPw ere
jk
-
8/2/2019 7 CurvesBSpline Rev 2
29/53
PERIODIC OR CLOSEDB-SPLINE CURVES
P i di Cl d B S li C
-
8/2/2019 7 CurvesBSpline Rev 2
30/53
Periodic or Closed B-Spline Curves
( )
=
nAifnAofremainder ,/
The mod function enables the periodic (cyclic) translation of the canonicalbasis function N0,k, which is the same as that for non-periodic curve.
zero.becomersdenominatoif10
0Choose
function.stepunitaisThis,0
,1
)(
)()(
)(
)()()(
1
1,
1
1,1
1
1,
,
=
=
+
=
+
++
+
+
+
otherwise
uuuN
where
uu
uNuu
uu
uNuuuN
ii
i
iki
ki
ki
iki
ki
iki
A=4, n=4, (A) mod (n) = 0
-
8/2/2019 7 CurvesBSpline Rev 2
31/53
Characteristics of Periodic B-Splines
The difference from non-periodic curves is
the choice of knots and basis functions Periodic B-spline basis functions with
These basis functions are cyclic translatesof a single canonical function with a period
(interval) of kfor support.
-
8/2/2019 7 CurvesBSpline Rev 2
32/53
Characteristics of Periodic B-Splines
They also have the properties of partitionof unity, positivity, local support andcontinuity.
They do not pass through the end controlpoints
Therefore they are not tangent to the firstand last control segments
-
8/2/2019 7 CurvesBSpline Rev 2
33/53
k=2 (linear); uj = [0 1 2]
N0,2
0 1 2
1
u
N0,3 k=3 (quadratic); uj= [0 1 2 3]
03
3/4
N0,4
k=4 (cubic); uj = [0 1 2 3 4]
0 4
2/3
PARAMETRIC FORM OF PERIODIC CURVE
-
8/2/2019 7 CurvesBSpline Rev 2
34/53
))1(mod)1(()(equations.followingthefromcalculatedbetoare
instead,curves,periodicforfunctionsbasisspline-BtheHowever,
0)()(
ispointscontrol1)(ndefined1)-(kdegreeofcurveperiodicThe
,0,
0
max,
=
+++=
=
+
=
nniuNuN
uuuNu
kki
n
i
kiiPPPPPPPP
36mod90;8mod83.5;6mod3.5example,For
,ofreminder
,0
,
mod
asdefinedisItfunction.modulotheis1)mod(nThe
,
===
>
=