the essentials of cagd
play

The Essentials of CAGD Chapter 13: NURBS Gerald Farin & Dianne - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 13: NURBS Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/essentials-cagd 2000 c Farin & Hansford The Essentials of CAGD 1 / 28


  1. The Essentials of CAGD Chapter 13: NURBS Gerald Farin & Dianne Hansford CRC Press, Taylor & Francis Group, An A K Peters Book www.farinhansford.com/books/essentials-cagd � 2000 c Farin & Hansford The Essentials of CAGD 1 / 28

  2. Outline Introduction to NURBS 1 Conics 2 Reparametrization and Classification 3 Derivatives 4 The Circle 5 Rational B´ ezier Curves 6 Rational B-spline Curves 7 Rational B´ ezier and B-spline Surfaces 8 Surfaces of Revolution 9 Farin & Hansford The Essentials of CAGD 2 / 28

  3. Introduction to NURBS NURBS Non-uniform Rational B-splines Much of the previous discussion of B-spline curves and B-spline surfaces applies to NURBS Here: focus on special features of NURBS Most of these features are already exhibited by conics Farin & Hansford The Essentials of CAGD 3 / 28

  4. Conics Conic sections: the oldest known curve form Essential to many CAD systems Conics were the basis for the first “CAD” system R. Liming in 1944 – Based the design of airplane fuselages – calculating with conics as opposed to traditional drafting with conics Farin & Hansford The Essentials of CAGD 4 / 28

  5. Conics A conic section in E 2 is the perspective projection of a parabola in E 3 Formulation as rational curves: – Center of the projection: origin 0 (3D coordinate system) – Projection plane: z = 1 (copy of E 2 )   x � x / z � x = − → = x y   y / z z Family of points f x project onto x 3D point x called homogeneous form or homogeneous coordinates of x Farin & Hansford The Essentials of CAGD 5 / 28

  6. Conics Conic as a parametric rational quadratic curve c ( t ) = z 0 b 0 B 2 0 ( t ) + z 1 b 1 B 2 1 ( t ) + z 2 b 2 B 2 2 ( t ) z 0 B 2 0 ( t ) + z 1 B 2 1 ( t ) + z 2 B 2 2 ( t ) control points b 0 , b 1 , b 2 ∈ E 2 weights z 0 , z 1 , z 2 ∈ R 3D parabola projected onto the conic c has homogenous control points � b 0 � � b 1 � � b 2 � z 0 z 1 z 2 1 1 1 Farin & Hansford The Essentials of CAGD 6 / 28

  7. Conics Example: Homogeneous control points       0 2 4 b 0 = 1 b 1 = 2 b 2 = 0       1 2 2 Project onto the 2D points � 0 � � 1 � � 2 � b 0 = b 1 = b 2 = 1 1 0 Weights: z i = 1 , 2 , 2  2  � 8 / 7 � x (0 . 5) = 5 / 4 → = x (0 . 5)   5 / 7 7 / 4 Farin & Hansford The Essentials of CAGD 7 / 28

  8. Reparametrization and Classification It is possible to change the weights of a conic without changing its shape Initial weights: z 0 , z 1 , z 2 c 2 z 2 Conic with weights z 0 , cz 1 , c � = 0 has the same shape Conic in standard form: characterized by weights 1 , cz 1 , 1 Steps: Scale all weights so that z 0 = 1 ⇒ 1 , ˆ z 1 , z 2 ˆ 1 Set c = 1 / √ ˆ ⇒ 1 , z 1 , ˜ 1 z 2 2 This change in weights does change how it is traversed ⇒ reparametrization Example: √ Initial weights 1 , 2 , 2 Let c = 1 / 2 √ ⇒ new weights in standard form: 1 , 2 / 2 , 1 Farin & Hansford The Essentials of CAGD 8 / 28

  9. Reparametrization and Classification Conic is in standard form ⇒ easy to determine type: a hyperbola if z 1 > 1 a parabola if z 1 = 1 an ellipse if z 1 < 1 Identify these in the figure Farin & Hansford The Essentials of CAGD 9 / 28

  10. Reparametrization and Classification Weights z 0 , z 1 , z 2 all z i > 0 ⇒ curve inside control polygon Special reparametrization: Setting c = − 1 generates weights z 0 , − z 1 , z 2 ⇒ evaluation for t ∈ [0 , 1] traces points in the complementary segment Farin & Hansford The Essentials of CAGD 10 / 28

  11. Derivatives Conic section written as a rational function Straightforward approach: derivatives need the quotient rule Instead: Conic c ( t ) is of the form c ( t ) = p ( t ) / z ( t ) (polynomial numerator) p ( t ) = z ( t ) c ( t ) Polynomial curve differentiated using the product rule: p ( t ) = ˙ ˙ z ( t ) c ( t ) + z ( t ) ˙ c ( t ) Expression ˙ c ( t ) is desired conic derivative 1 c ( t ) = ˙ z ( t )[ ˙ p ( t ) − ˙ z ( t ) c ( t )] Farin & Hansford The Essentials of CAGD 11 / 28

  12. Derivatives Consider two conics #1 b 0 , b 1 , b 2 w 0 , w 1 , w 2 defined over [ u 0 , u 1 ] #2 b 2 , b 3 , b 4 w 2 , w 3 , w 4 defined over [ u 1 , u 2 ] Both segments form a C 1 curve if w 1 w 3 ∆ b 1 = ∆ b 2 u 1 − u 0 u 2 − u 1 Interval lengths appear due to application of the chain rule – Composite curve defined with respect to global parameter u Notice absence of the weight w 2 in the C 1 equation Farin & Hansford The Essentials of CAGD 12 / 28

  13. The Circle b 1 α b 0 b 2 Circular arc: most widely used conic Represent it as a rational quadratic B´ ezier curve: – Control polygon must form an isosceles triangle (symmetry!) – Weights 1 , z 1 , 1 z 1 = cos α α = ∠ ( b 2 , b 0 , b 1 ) Farin & Hansford The Essentials of CAGD 13 / 28

  14. The Circle Whole circle represented by piecewise rational quadratics: Method 1 : – Represent one quarter with the control polygon – Represent remaining part with the complementary segment Method 2 : – Use four control polygons ⇒ Convex hull property Farin & Hansford The Essentials of CAGD 14 / 28

  15. The Circle Arc of a circle in sin/cos parametrization ⇒ Nice property: traverses circle with unit speed Arc of a circle in rational quadratic form ⇒ Parameter t does not traverse the circle with unit speed Need numerical techniques to split arcs into equiangular segments Farin & Hansford The Essentials of CAGD 15 / 28

  16. Rational B´ ezier Curves 4D points and their 3D projections:   x   x / w y  = x   x = − → y / w    z   z / w w ezier curve in E 4 projected into w = 1 hyperplane Degree n B´ ezier curve of degree n in E 3 ⇒ Rational B´ x ( t ) = w 0 b 0 B n 0 ( t ) + · · · + w n b n B n n ( t ) b i ∈ E 3 x ( t ) , w 0 B n 0 ( t ) + · · · + w n B n n ( t ) Homogeneous form of the curve: x ( t ) = b 0 B n 0 ( t ) + · · · + b n B n n ( t ) Evaluation : de Casteljau algorithm to homogeneous form and project result into 3D Farin & Hansford The Essentials of CAGD 16 / 28

  17. Rational B´ ezier Curves Example: Control points: � 0 � − 1 � � 0 � � � 1 � , , , 0 1 − 1 0 Weights: 1 , 2 , 1 , 1 Homogeneous control points         − 1 0 0 1  ,  ,  , 0 2 − 1 0      1 2 1 1 Applying the de Casteljau algorithm � 0 . 0   0 . 0 � x (0 . 5) = 0 . 375 then x (0 . 5) =   0 . 2727 1 . 375 Farin & Hansford The Essentials of CAGD 17 / 28

  18. Rational B´ ezier Curves If all weights are one ⇒ standard nonrational B´ ezier curve – Denominator is identically equal to one If some w i are negative: singularities may occur ⇒ Only deal with nonnegative w i If all w i are nonnegative, we have the convex hull property Rational B´ ezier curves enjoy all the properties that their nonrational counterparts possess – Example: affine invariance Farin & Hansford The Essentials of CAGD 18 / 28

  19. Rational B´ ezier Curves Influence of the weights Top curve corresponds to w 2 = 10 Bottom curve corresponds to w 2 = 0 . 1 Farin & Hansford The Essentials of CAGD 19 / 28

  20. Rational B´ ezier Curves Rational B´ ezier curves are projectively invariant Projective map: 4 × 4 matrix A ¯ x = A x Map will change the weights of a curve – Example: Projective map of rational quadratic conics can map an ellipse to a hyperbola Farin & Hansford The Essentials of CAGD 20 / 28

  21. Rational B´ ezier Curves Curvature at t = 0: κ (0) = 2 n − 1 w 0 w 2 area [ b 0 , b 1 , b 2 ] � b 1 − b 0 � 3 n w 1 Torsion at t = 0: τ (0) = 3 n − 2 volume [ b 0 , b 1 , b 2 , b 3 ] w 0 w 3 area [ b 0 , b 1 , b 2 ] 2 2 n w 1 w 2 Farin & Hansford The Essentials of CAGD 21 / 28

  22. Rational B-spline Curves NonUniform Rational B-spline curveS NURBS – CAD/CAM industry standard x ( u ) = w 0 d 0 N n 0 ( u ) + . . . + w D − 1 d D − 1 N n D − 1 ( u ) w 0 N n 0 ( u ) + . . . + w D − 1 N n D − 1 ( u ) All properties from the rational B´ ezier form carry over – Example: convex hull property (for nonnegative weights) – Example: affine and projective invariance Designing with NURBS curves: – Added freedom of changing weights – Change of only one weight affects curve only locally Farin & Hansford The Essentials of CAGD 22 / 28

  23. Rational B´ ezier and B-spline Surfaces Generalize B´ ezier and B-spline surfaces to rational – Similar to curve case Rational B´ ezier or B-spline surface is projection of a 4D tensor product B´ ezier or B-spline surface Rational B´ ezier patch: x ( u , v ) = M T B w N M T WN – Matrix B w has elements w i , j b i , j – Matrix W has elements w i , j (weights) Influence the shape of the surface Farin & Hansford The Essentials of CAGD 23 / 28

  24. Rational B´ ezier and B-spline Surfaces Rational B-spline surface: s ( u , v ) = M T D w N M T WN Matrices M and N contain the B-spline basis functions in u and v Figure: weights of gray control points set to 3 Farin & Hansford The Essentials of CAGD 24 / 28

Recommend


More recommend