L5 Polyomal / Sple Curves Cotets Coc sectos Polyomal Curves Hermte Curves Bezer Curves B-Sples No-Uform Ratoal B-Sples (NURBS) Mapulato ad Represetato of Curves
Types of Curve Equatos Implct: Descrbe a curve by a equato relatg to (xyz) coordates Advatages: Compact; Easy to check f a pot belogs to the curve Easy to hadle topologcal chage x Dsadvatages: Dffcult for curve evaluato Dffcult for partal curve defto Parametrc: represet the (xyz) coordates as a fucto of a sgle parameter (e.g. t as tme for the trajectory of a movg path) Advatages: Easy for curve evaluato x R cost y Coveet for partal curve defto May others such as easy for mapulato tersecto. 2 2 y 2 R 2 z 0 Rs t z 0 (0 t 2 )
Coc Sectos Obtaed by cuttg a coe wth a plae Crcle or Crcular arc Ellpse or Ellptc Arc Parabola Hyperbola Arbtrary Cocs (o-caocal form) 3
Crcle Ellpse ad Parabola 4
Hyperbola 5
No-caocal cocs 6
Cubc Polyomal Curve Defto P(u) = [x(u) y(u) z(u)] T = a 0 + a u + a 2 u 2 + a 3 u 3 (0 u ) Major Drawback: a 0 a a 2 a 3 are smply algebrac vector coeffcets; they do ot reveal ay relatoshp wth the shape of the curve tself. I other words the chage of the curve s shape caot be tutvely atcpated from chages ther values. Data fttg? How? Parameterzato (Uform Chordal Legth) Least-Square Soluto Why ot quadrc? P(u) = a 0 + a u + a 2 u 2 (0 u ) 7
Cubc Polyomal Curve 8
Quadrc Polyomal Curve 9
Cotuty Measures the degree of smoothess of a curve. C 0 cotuous posto cotuous C cotuous slope cotuous C 2 cotuous curvature cotuous C s the mmum acceptable curve for egeerg desg. Cubc polyomal s the lowest-degree polyomal that ca guaratee the geerato of C 0 C ad C 2 curves. Hgher order curves ted to oscllate about cotrol pots. That s reaso why cubc polyomal s always used. 0
Hermte Curve Defto Beefts: P(u) = f0(u)p0 + f(u)p + f2(u)p0 + f3(u)p (0 u ) If the desger chages P0 or P he mmedately kows what effect t wll have o the shape the ed pot moves. Smlarly f he modfes P0 or P he kows at least the taget drecto at that ed pot wll chage accordgly. Defcecy It s ot easy ad ot tutve to predct curve shape accordg to chages magtude of the tagets P0 or P.
Defto of Hermte Curve 2
Effect Tagets Drectos o a Hermte Curve Chage of taget drecto at pot p 3
Effect Tagets Magtude o a Hermte Curve k 0 : magtude of taget at p 0 k : magtude of taget at p The taget drectos at p 0 ad p are fxed. 4
Bezer Curve Defto: How was Bezer curve dscovered?. Look at the desred propertes 2. Start from = to arbtrary 5
6
Partto of Uty 7
Examples of Bezer Curves https://www.desmos.com/calculator/cahqdxeshd 8
9
(2-)+(-)++ 20
2
Iterpolato Usg Multple Bezer Curves Smoothly terpolate a ordered lst of pots by may Bezer curves 22
Iterpolato Usg A Sgle Bezer Curve 23 Gve pots Q Q 2 Q m fd a Bezer curve P(u) wth cotrol pots P 0 P P ( < m) so that P(u) terpolates all the Q.. P 0 = Q 0 ; P = Q m. 2. 3. 4. 5. These are 3 depedet sets of (-) lear equatos; solve them we get cotrol pots P 0 P P whose correspodg Bezer best ft the pots Q Q 2 Q m the least-squares sese. 2 3 0 m j P u B Q e j j j... ; 2 3 2 2 m j Q Q Q Q u m j j... ; 2 0 0 0 z S y S x S r r r... ; ; 2 2 2 2 2 2 m j j r r e z y x z y x z y x S P P P S I-class exercse: verfy t for the case of = 3 ad plaar.
Hgh degree Drawbacks of Bezer curve The degree s determed by the umber of cotrol pots whch ted to be large for complcated curves. Ths causes oscllato as well as creases the computato burde. No-local modfcato Property Whe modfyg a cotrol pot the desger wats to see the shape chage locally aroud the moved cotrol pot. I Bezer curve case movg a cotrol pot affects the shape of the etre curve ad thus the portos o the curve ot teded to chage. http://www.mat.dtu.dk/people/j.gravese/cagd/bez9-3.html Itractable lear equatos If we are terested terpolato rather tha just approxmatg a shape we wll have to compute cotrol pots from pots o the curve. Ths leads to systems of lear equatos ad solvg such systems ca be mpractcal whe the degree of the curve s large. 24
Why ad What To Do? The culprt s the Bezer curve s bledg fuctos f (u) = B (u): because B (u) s o-zero the etre parameter doma [0] f the cotrol pot P moves t wll also affect the etre curve. What we eed s some bledg fucto f (u) such that:. It s o-zero over oly a lmted porto of the parameter terval of the etre curve ad ths lmted porto s dfferet for each bledg fucto. (Therefore whe P moves t oly affects a lmted porto of the curve.) 2. It s depedet of the umber of cotrol pots. Aswer: B-Sples 25
Defto of B-Sple Curve 26
Propertes of B-Sple Curves 27
Local Cotrol o B-Sple Curves Cotrol pot P 4 moves to a ew posto P 4 ; oly a porto of the orgal curve has chaged. 28
Nouform Ratoal B-Sples (NURBS) P( u) 0 w 0 p w N N K K ( u) ( u) for 0 u < -K+2 wth kots vector {t 0 t... t +K }. If weghts w = for all the t reduces to a stadard B-Sple. NURBS s the most geeral ad popular represetato.. All Hermte Bezer ad B-sple are specal cases of NURBS. 2. It ca represet exactly cocs ad other specal curves. 3. The weghts w add oe more degree of freedom of curve mapulato. 4. It ejoys all the ce propertes of stadard (oratoal) B-sples (such as affe trasformato varat ad covex hull property). 29
Effect of Weghts o NURBS Curve 30
Parttog of Uty Property o NURBS Bass Fuctos 3 K K u w N u N w u 0 0 ) ( ) ( ) ( p P K K u w N u w N p 0 0 ) ) ( ) ( ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 0 0 0 0 0 0 0 K K K K K K K K u w N u w N u w N u N w u w N u w N u w N u N w... http://fab.cba.mt.edu/classes/s62.2/docs/pegl_nurbs.pdf
Take Home Questos (). Gve the parametrc curve represetato of the ellpse show left. (Ht: utlze trasformatos.) 2. Cosder the Hermte curve defed the plae wth P(0) = (23) P() = (4 0) P (0) = (32) ad P () = (3-4). a. Fd a Bezer curve of degree 3 that represets ths Hermte curve as exactly as possble.e. decde the four cotrol pots of the Bezer curve. b. Expad both of the curve equatos to polyomal form ad compare them. Are they detcal? 32
Take Home Questos (2) 3. Determe a Bezer curve of degree 3 that approxmates a quarter crcle cetered at (00). The two ed pots of the quarter crcle are (0) ad (0). Calculate the X ad Y coordates of the mddle pot of your Bezer curve ad compare them wth that of the quarter crcle. 4. Aswer the followg questos for a o-perodcal ad uform B-sple of order 3 defed by the cotrol pots P0 P P2 ad P3: a. What are the kots values? b. There are two depedet curves comprsg ths B-sple each defed o the parameter rage u[0] ad u[2] respectvely. Expad the B-sple curve equato to get the separate equatos of these two curves. c. The two curve equatos of b have dfferet parameter u-rages.e. for the frst curve C (u) ts parameter u-rage s [0 ] for the 2 d curve C 2 (u) t s [2]. Please do: () Show that curve C (u) s a Bezer curve. What are ts cotrol pots? (2) Let s = u. Show that C 2 (s+): s[0] s also a Bezer curve. What are ts cotrol pots? 33