curve modeling nurbs dr. s.m. malaekae.sharif.edu/~aerocad/curve modelling-nurbs.pdf · properties...
TRANSCRIPT
![Page 1: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/1.jpg)
Curve ModelingNURBS
Dr. S.M. MalaekAssistant: M. Younesi
![Page 2: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/2.jpg)
Motivation
![Page 3: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/3.jpg)
Motivation
We need more controlmore controlover the curve
![Page 4: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/4.jpg)
MotivationDesign Sketch
![Page 5: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/5.jpg)
MotivationRendered
![Page 6: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/6.jpg)
MotivationFinal Physical Product
![Page 7: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/7.jpg)
MotivationDifferent weights of control points
![Page 8: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/8.jpg)
MotivationIt is hard to product exact circle with B-spline.
Circles can only be represented with rationalrational function (i.e., functions that are quotients of two polynomials).
four closed B-spline curves with 8 control points :
Degree 2 Degree 3 Degree 5 Degree 10
![Page 9: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/9.jpg)
Motivation Circles, ellipses and many other curves that cannot be represented by polynomials.
we need an extension to B-splinecurves.
![Page 10: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/10.jpg)
Motivation Generalize B-splines to rational curvesusing homogeneous coordinateshomogeneous coordinates:
Non-Uniform Rational B-Splines(NURBS)
![Page 11: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/11.jpg)
NURBS Different weights of Pi, to have different attraction factors.
W1=0.4
W3=3.0
Wi=1
![Page 12: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/12.jpg)
NURBS Different weights of Pi, to have different attraction factors.
Wi=1 W0=W2=W3=W5=1, W1=W4=4
![Page 13: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/13.jpg)
NURBS B-spline Curve: Given n+1 control points P0, P1, ..., Pnand knot vector U = { u0, u1, ..., um } of m+1 knots, the B-spline curve of degree p :
i
n
ipi uNu PC )()(
0,∑=
=
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
∑==
i
iw
ii
ii
n
ipi
w
wzwywxw
uNu0
, )()(C
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
1i
i
i
i zyx
P⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
=
i
iw
ii
ii
wi
wzwywxw
P
Multiply the coordinates of Piwith a weight w
B-Spline Curve in homogeneous coordinate
![Page 14: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/14.jpg)
NURBS
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
∑==
i
iw
ii
ii
n
ipi
w
wzwywxw
uNu0
, )()(C
( )( )( )
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
∑∑∑∑
=
=
=
=
=
i
ni pi
ii
ni pi
ii
ni pi
ii
ni pi
w
wuNzwuNywuNxwuN
u
)()()()(
)(
0 ,
0 ,
0 ,
0 ,
C
![Page 15: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/15.jpg)
NURBS Convert it back to Cartesian coordinate by dividing Cw(u) with the fourth coordinate:
∑
⎥⎥⎥⎥
⎦
⎤
⎢⎢⎢⎢
⎣
⎡
∑=
==
n
ii
i
i
nj ipj
ipi
zyx
wuNwuN
u0
0 ,
,
1)(
)()(C
∑∑ =
=
=n
iiipin
i ipi
wuNwuN
u0
,
0 ,
)()(
1)( PC
∑=
=n
iipi uRu
0, )()( PC∑ =
=nj jpj
ipipi
wuN
wuNuR
0 ,
,,
)(
)()(
![Page 16: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/16.jpg)
TwoTwoImmediate Results
![Page 17: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/17.jpg)
Two Immediate Results
1. If all weights are equal to 1, a NURBScurve reduces to a B-spline curve.
2. NURBS Curves are Rational.
∑=
=n
iipi uRu
0, )()( PC
∑ =
= nj jpj
ipipi
wuN
wuNuR
0 ,
,,
)(
)()(
![Page 18: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/18.jpg)
Propertiesof
NURBS NURBS Basis Function
![Page 19: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/19.jpg)
Properties of NURBS Basis Function1. Ri,p(u) is a degree p rational function in u
2. Nonnegativity -- For all i and p, Ri,p(u) is nonnegative
3. Local Support -- Ri,p(u) is a non-zero on [ui,ui+p+1)
4. On any knot span [ui, ui+1) at most p+1 degree p basis functions are non-zero.
5. Partition of Unity -- The sum of all non-zero degree pbasis functions on span [ui, ui+1) is 1:
![Page 20: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/20.jpg)
Properties of NURBS Basis Function6. If the number of knots is m+1, the degree of the basis
functions is p, and the number of degree p basis functions is n+1, then m = n + p + 1 :
7. Basis function Ri,p(u) is a composite curve of degree prational functions with joining points at knots in [ui, ui+p+1 )
8. At a knot of multiplicity k, basis function Ri,p(u) is Cp-k
continuous.
9. If wi = c for all i, where c is a non-zero constant, Ri,p(u) = Ni,p(u)
![Page 21: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/21.jpg)
Propertiesof
NURBS NURBS Curves
![Page 22: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/22.jpg)
Properties of NURBS Curves1. NURBS curve C(u) is a piecewise curve with each
component a degree p rational curve.
2. Equality m = n + p + 1 must be satisfied .
3. A clamped NURBS curve C(u) passes through the two end control points P0 and Pn
4. Strong Convex Hull Property
5. Local Modification Scheme6. C(u) is Cp-k continuous at a knot of multiplicity k
7. B-spline Curves and Bézier Curves Are Special Cases of NURBS Curves
![Page 23: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/23.jpg)
Properties of NURBS Curves8. Modifying Weights: increasing the value of wi will
pull the curve toward control point Pi
a NURBS curve of degree 6and its NURBS basis functions. The selected control point is P9.
![Page 24: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/24.jpg)
Properties of NURBS Curves Modifying Weights: decreasing the value of wi will pushthe curve away from control point Pi
If a weight becomes zero, the coefficient of Pi is zero and, control point Pi has no impact on the computation of C(u) for any u (i.e., Pi is "disabled").
![Page 25: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/25.jpg)
Properties of NURBS Curves
A NURBS curve of degree 6defined by 9 control points (n = 8) and 16 knots (m = 15) .The selected control point is P4. Since the coefficient of P4, N4,6(u), is non-zero on [u4, u4+6+1) = [0,1),changing w4 affects the entire curve!
![Page 26: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/26.jpg)
Rational Bézier Curves
![Page 27: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/27.jpg)
Rational Bézier Curves We have learned that projecting a 4-dimensional B-spline curve to hyperplane w=1 yields a 3-dimensional NURBS curve.
What if this B-spline curve is a Bézier curve?
The result is a Rational BRational Béézierzier curve!
![Page 28: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/28.jpg)
Rational Bézier Curves Since a rational Bézier curve is a special case of NURBS curves, rational Bézier curves satisfy all important properties that NURBS curves have.
since there is no internal knots, rational Bézier curves do not have the local modification property, which means modifying a control point or its weight will cause a global change
∑=
=n
iini uRu
0, )()( PC ∑ =
= n
j jjn
inini
wuB
wuBuR
0 ,
,,
)(
)()(
![Page 29: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/29.jpg)
Rational Bézier Curves
Modifying the weight of a control point will push or pull the curve away from
or toward the control point.
∑=
=n
iini uRu
0, )()( PC ∑ =
= n
j jjn
inini
wuB
wuBuR
0 ,
,,
)(
)()(
![Page 30: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/30.jpg)
Rational Bézier Curves:Conic Sections
![Page 31: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/31.jpg)
Rational Bézier Curves: Conic Sections we use rational Bézier curve of degree 2, the coefficients are :
22,2
1,2
20,2
)()1(2)(
)1()(
uuBuuuB
uuB
=−=−=
∑ =
= n
j jjn
inini
wuB
wuBuR
0 ,
,,
)(
)()(
∑=
=n
iini uRu
0, )()( PC
![Page 32: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/32.jpg)
Rational Bézier Curves: Conic Sections
The equation of this rational Bézier curve of degree 2 is :
( )210 PPPC 2222 )1(2)1(
)1(2)1(1)( uuwuu
uuwuuu +−+−
+−+−=
10,1
<≤−
= rr
rw
r=0W=0
Straight line
r<1/2W<1Ellipse
r=1/2W=1Parabola
r>1/2W>1Hyperbola
P0=1P1=wP2=1
![Page 33: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/33.jpg)
Rational Bézier Curves: Conic Sections
r=0W=0
Straight line
r<1/2W<1Ellipse r=1/2W=1Parabola r>1/2W>1Hyperbola
P0=1P1=wP2=1
![Page 34: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/34.jpg)
Rational Bézier Curves: Conic Sections
Circular Arcs and Circles
)sin(aw = Weights w is equal to the sine of the half ngle at control point P1
![Page 35: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/35.jpg)
Rational Bézier Curves: Conic Sections
Quarter Circle: P1=90º, a=45º,
22)45sin( == ow
![Page 36: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/36.jpg)
Rational Bézier Curves: Conic Sections
1/3 Circle: P1=60º, a=30º,
21)30sin( == ow
![Page 37: Curve Modeling NURBS Dr. S.M. Malaekae.sharif.edu/~aerocad/Curve modelling-NURBS.pdf · Properties of NURBS Basis Function 6. If the number of knots is m+1, the degree of the basis](https://reader034.vdocuments.net/reader034/viewer/2022042709/5f4f0ef007e7574b3d12235a/html5/thumbnails/37.jpg)
Rational Bézier Curves: Conic Sections
Full Circle:
⎥⎦⎤
⎢⎣⎡= 1,1,1,
32,
32,
32,
31,
31,
31,0,0,0U ⎥⎦
⎤⎢⎣⎡= 1,1,1,
43,
43,
21,
21,
41,
41,0,0,0U