degree elevation - vracpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times...

34
ME525x NURBS Curve and Surface Modeling Page 355 Degree Elevation Let be an n-th degree polynomial curve. Clearly, we can set a n+1 = 0 and write C n (u) as an (n + 1)-th degree curve C n u ( 29 a i u i i 0 = n = C n u ( 29 C n 1 + u ( 29 a i u i i 0 = n 1 + = =

Upload: others

Post on 09-Aug-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 5 5

Degree Elevation

Let be an n-th degree

polynomial curve. Clearly, we can set an+1 = 0and write Cn(u) as an (n + 1)-th degree curve

Cn u( ) aiui

i 0=

n

∑=

Cn u( ) Cn 1+ u( ) aiui

i 0=

n 1+

∑= =

Page 2: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 5 6

From a vector space point of view, Cn+1(u) issimply Cn(u) embedded in a higherdimensional space.

Now let be a p-th

degree NURBS curve on the knot vector U.

Cpw u( ) Ni p, u( ) Pi

w

i 0=

n

∑=

Page 3: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 5 7

Since it is a piecewise polynomial curve, itshould be possible to elevate its degree top + 1. Thus there must be a set of controlpoints Qw

i and knot vector such that

where Cwp(u) and Cw

p + 1(u) are the samecurve, geometrically and parametrically.Degree elevation refers to the process offinding the unknown Qw

i and

U

Cpw u( ) Cp 1+

w Ni p 1+, u( ) Qiw

i 0=

n

∑= =

U

Page 4: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 5 8

Applications of elevation include the following:

• The construction of certain types of surfacesfrom a set of curves. Using tensor productsurfaces requires that these curves have acommon degree.

Page 5: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 5 9

• Let C1, ..., Cn, (n ≥ 2) be a sequence ofNURBS curves with the property that the endpoint of Ci is coincident with the start point ofCi+1. Then the curve may be composed intoone NURBS curve. One step in the processis to elevate to a common degree.

As usual, degree elevation algorithms areapplied to Cw

p(u) in 4D space, and hence, wedrop the w for the remainder of this discussion.

Page 6: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 0

There are three unknowns in the aboveequation, , and the {Qw

i}. and can bedetermined by the following reasoning.Suppose U has the form

n U n U

U u0 … um, ,{ }=

a … a u1 … u1 … us … us b … b, , , , ,, , , , , , ,{ }=

p + 1 p + 1m1 ms

Page 7: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 1

where m1, ..., ms denote the multiplicities ofthe interior knots. Now, Cp(u) is a polynomialcurve on each nondegenerate knot span;hence, its degree can be elevated to p + 1 oneach such knot span.

Page 8: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 2

At a knot of multiplicity mi, Cp(u)is -continuous. Since the degreeelevated curve, Cp+1(u), must have the samecontinuity, it follows that the knot must havemultiplicity mi + 1 for Cp+1(u). This yields:

and

Cp mi–

n n s 1+ +=

Page 9: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 3

where

U u0 … um, ,{ }=

a … a u1 … u1 … us … us b … b, , , , ,, , , , , , ,{ }=

p + 2 p + 2m1 + 1 ms + 1

m m s 2+ +=

Page 10: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 4

The only remaining problem is to compute the{Qi}. An obvious (but very inefficient) methodto do this is to solve a system of linearequations. Setting,

and evaluating the Ni,p(u) and Ni,p+1(u) atappropriate + 1 values, yields a bandedsystem of + 1 linear equations in theunknowns Qi.

Ni p 1+, u( ) Qii 0=

n

∑ Ni p, u( ) Pii 0=

n

∑=

nn

Page 11: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 5

Most algorithms in the literature are moreefficient but are mathematically morecomplicated, and are designed to raise thedegree by 1. The one presented here isefficient, mathematically simple, and designedto raise the degree by more than one (in onestep).

Page 12: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 6

The degree elevation algorithm applies thefollowing steps:

• Using knot insertion, extract the i-th Beziersegment from the curve.

• Degree elevate the i-the Bezier segment.

• Remove unnecessary knots separating the (i- 1)-th and i-th segments.

The following example illustrates its operation.

Page 13: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 7

original curveU={0 0 0 0 ua ub 1 1 1 1}

Page 14: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 8

ua inserted 2 times(mua = 3)

Page 15: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 6 9

Bezier segment on [0, ua]degree elevated (4pts -> 5pts)

Page 16: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 0

ub inserted 2 times

Page 17: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 1

Bezier segment on [ua, ub]degree elevated

Page 18: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 2

knot ua removed twice

Page 19: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 3

last segment on [ub, 1]degree elevated

Page 20: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 4

knot ub removed twice

Page 21: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 5

Step one is a simple application of the knotinsertion algorithm until the i-th knot hasmultiplicity p.

The second step is more interesting. Letsderive the formula to elevate a Bezier curvefrom p to p + 1. Let,

Cp u( ) Bi p, u( ) Pii 0=

p

∑=

Page 22: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 6

be a p-th degree Bezier curve. Itsrepresentation as a (p + 1)-th degree curve is

Cp 1+ u( ) Bi p 1+, u( ) Qii 0=

p 1+

∑=

Page 23: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 7

Setting these equal and multiplying Cp(u) by(u + (1 - u)) (= 1) yields:

Bi p 1+, u( ) Qii 0=

p 1+

∑ =

u 1 u–( )+( ) Bi p, u( ) Pii 0=

p

∑=

1 u–( ) Bi p, uBi p,+( ) Pi

i 0=

p

∑=

Page 24: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 8

Using the notation,

and applying the definition of the Bezierblending functions Bi,p(u), we obtain,

p!i! p i–( ) !------------------------ p

i =

Page 25: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 7 9

p 1+i

ui 1 u–( ) p 1 i–+ Qii 0=

p 1+

∑ =

pi

i 0=

p

∑ ui 1 u–( ) p 1 i–+(=

ui 1+ 1 u–( ) p i– ) Pi+

Page 26: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 0

p 1+i

ui 1 u–( ) p 1 i–+ Qii 0=

p 1+

∑ =

pi

ui 1 u–( ) p 1 i–+ Pii 0=

p

∑=

pi 1–

ui 1 u–( ) p 1 i–+ Pi 1–i 1=

p 1+

∑+

Page 27: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 1

Equating coefficients ofyields,

ui 1 u–( ) p 1 i–+

p 1+i

Qipi

Pip

i 1– Pi 1–+=

Page 28: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 2

And, from

pi

p 1+i

÷ p!i! p 1 i–+( ) !i! p i–( ) ! p 1+( ) !----------------------------------------------=

p 1 i–+p 1+

-------------------- 1 ip 1+------------–==

Page 29: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 3

and

it follows that:

pi 1–

p 1+i

÷ =

p!i! p 1 i–+( ) !i 1–( ) ! p 1 i–+( ) ! p 1+( ) !

-----------------------------------------------------------------------=

ip 1+------------=

Qi 1 αi–( ) Pi αiPi 1–+=

Page 30: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 4

where,

Note that this equation represents a cornercutting process analogous to the deCastlejaualgorithm.

There are two important points regarding thisformula with respect to algorithmicimplementation,

αii

p 1+------------= i, 0 … p 1+, ,=

Page 31: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 5

• It can be applied recursively to elevate thedegree t times.

• The α’s depend only on the degree, not onthe particular Bezier segment to which theyare applied. Hence, they can be computedone time and stored in a local array beforeprocessing of the segments begins.

The final step of the degree elevationalgorithm, knot removal, is simpler than thegeneral case for the following two reasons.

Page 32: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 6

• We know how many knots are removable,i.e., the number that was inserted. Thus thereis no need to check point coincidence andthe associated intermediate steps can beavoided.

• The knot vector has a specific structure in theneighborhood of the knot being removed(again, because we know the original)

Page 33: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 7

Let

be a NURBS surface. Degree elevation isaccomplished for surfaces by applying it to therows/columns of control points.

Sw u v,( ) Ni p, u( ) Nj q, v( ) wijPijw

j 0=

m

∑i 0=

n

∑=

Page 34: Degree Elevation - VRACpublic.vrac.iastate.edu/~oliver/courses/me625/week10b.pdfua inserted 2 times (mua = 3) ME525x NURBS Curve and Surface Modeling Page 369 Bezier segment on [0,

M E 5 2 5 x N U R B S C u r v e a n d S u r f a c e M o d e l i n g P a g e 3 8 8

In particular, we elevate the degree p(u-direction) by applying algorithm A5.9 toeach of the m + 1 columns of control points.The v-direction degree q is elevated byapplying the algorithm to each of the n + 1rows of control points.

An efficient implementation of the surfacedegree elevation algorithm requires storage ofBezier strips.