the essentials of cagd
play

The Essentials of CAGD Chapter 9: Composite Curves Gerald Farin - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 9: Composite Curves 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. The Essentials of CAGD Chapter 9: Composite Curves 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 / 17

  2. Outline Introduction to Composite Curves 1 Piecewise B´ ezier Curves 2 C 1 and G 1 Continuity 3 C 2 and G 2 Continuity 4 Working with Piecewise B´ ezier Curves 5 Point-Normal Interpolation 6 Farin & Hansford The Essentials of CAGD 2 / 17

  3. Introduction to Composite Curves B´ ezier curves are a powerful tool One curve not suitable for modeling complex shape Composite curves: composed of pieces Also called piecewise curves or splines Examine piecewise B´ ezier curves – Conditions for smoothness Farin & Hansford The Essentials of CAGD 3 / 17

  4. Piecewise B´ ezier Curves knot sequence u 0 , u 1 , . . . Each B´ ezier curve is defined over an interval [ u i , u i +1 ] ∆ i = u i +1 − u i spline curve: piecewise curve defined over a knot sequence Farin & Hansford The Essentials of CAGD 4 / 17

  5. Piecewise B´ ezier Curves Spline curve s ( u ) u : Global parameter within the knot vector i th B´ ezier curve s i – Defined over [ u i , u i +1 ] – Local parameter t ∈ [0 , 1] t = u − u i ∆ i Junction point: curve segment end points: s ( u i ) = s i (0) = s i − 1 (1) Farin & Hansford The Essentials of CAGD 5 / 17

  6. Piecewise B´ ezier Curves Derivative of a spline curve at u when u ∈ [ u i , u i +1 ] d s ( u ) = d s i ( t ) d u = 1 d t d s i ( t ) d u d t ∆ i d t At junction points of B´ ezier curves 1 s 0 (1) = 3 1 s 1 (0) = 3 ˙ ∆ b 2 and ˙ ∆ b 3 ∆ 0 ∆ 0 ∆ 1 ∆ 1 Second derivatives follow similarly: 1 s 0 (1) = 6 1 s 1 (0) = 6 ∆ 2 b 1 ∆ 2 b 3 ¨ and ¨ ∆ 2 ∆ 2 ∆ 2 ∆ 2 0 0 1 1 Farin & Hansford The Essentials of CAGD 6 / 17

  7. C 1 and G 1 Continuity Conditions for two segments to form a differentiable or C 1 curve over the interval [ u 0 , u 2 ]: b 3 = ∆ 1 ∆ b 2 + ∆ 0 ∆ b 4 where ∆ = ∆ 1 + ∆ 2 = u 2 − u 0 Geometric interpretation: ratio ( b 2 , b 3 , b 4 ) = ∆ 0 ∆ 1 (Note sketch error: not in ratio 3:1) Farin & Hansford The Essentials of CAGD 7 / 17

  8. C 1 and G 1 Continuity Example: C 1 condition requires � 2 � b 3 = 2 3 b 2 + 1 3 b 4 = 2 Farin & Hansford The Essentials of CAGD 8 / 17

  9. C 1 and G 1 Continuity Interpret parameter interval [ u 0 , u 2 ] as a time interval C 1 motion ⇒ point’s velocity must change continuously Point must travel faster over “long” parameter intervals and slower over “short” ones Shape only concern? Then knot sequence not needed G 1 continuity: Tangent line varies continuously – Example: two cubic B´ ezier curves: b 2 , b 3 , and b 4 collinear Farin & Hansford The Essentials of CAGD 9 / 17

  10. C 2 and G 2 Continuity Assume C 1 Compare second derivatives at parameter value u 1 − ∆ 1 b 1 + ∆ b 2 = ∆ b 4 − ∆ 0 b 5 ∆ 0 ∆ 0 ∆ 1 ∆ 1 Geometric interpretation: d − = − ∆ 1 b 1 + ∆ b 2 ∆ 0 ∆ 0 d + = ∆ b 4 − ∆ 0 b 5 ∆ 1 ∆ 1 C 2 condition: d − = d + ≡ d Farin & Hansford The Essentials of CAGD 10 / 17

  11. C 2 and G 2 Continuity C 2 curves: b 2 = ∆ 1 ∆ b 1 + ∆ 0 ∆ d b 4 = ∆ 1 ∆ d + ∆ 0 ∆ b 5 ratio ( b 1 , b 2 , d ) = ratio ( d , b 4 , b 5 ) = ∆ 0 ∆ 1 Farin & Hansford The Essentials of CAGD 11 / 17

  12. C 2 and G 2 Continuity G 2 continuity ⇒ curvature continuity ρ 2 = ρ 0 ρ 1 where ρ 0 = ratio ( b 1 , b 2 , c ) ρ 1 = ratio ( c , b 4 , b 5 ) ρ = ratio ( b 2 , b 3 , b 4 ) Farin & Hansford The Essentials of CAGD 12 / 17

  13. C 2 and G 2 Continuity A curve that is G 2 but not C 2 ρ 0 = 1 ρ 1 = 3 ρ = 1 3 4 2 (1 2) 2 = 1 3 × 3 4 Farin & Hansford The Essentials of CAGD 13 / 17

  14. Working with Piecewise B´ ezier Curves Left: Points and tangent lines Right: Piecewise B´ ezier polygon Given: – Points that correspond to significant changes in geometry – Tangent lines at points where the character is smooth Find: Piecewise B´ ezier representation – One tangent line ⇒ Use G 1 smoothness conditions for B´ ezier curves Farin & Hansford The Essentials of CAGD 14 / 17

  15. Working with Piecewise B´ ezier Curves Order the points as p i 1 Convert tangent lines to unit vectors v i 2 For one cubic segment set 3 b 3 i = p i b 3 i +3 = p i +1 and Interior control points 4 b 3 i +1 = b 3 i + 0 . 4 � b 3 i +3 − b 3 i � v i b 3 i +2 = b 3 i +3 − 0 . 4 � b 3 i +3 − b 3 i � v i +1 Characters or fonts often stored as piecewise B´ ezier curves – Allows for easy rescaling – Pixel maps of fonts can result in aliasing effects – Each letter in this book is created by evaluating a piecewise B´ ezier curve Farin & Hansford The Essentials of CAGD 15 / 17

  16. Point-Normal Interpolation Given: – A pair of 3D points p 0 , p 1 – Normal vectors n 0 , n 1 at each p i Find: – Cubic connecting p 0 and p 1 – Curve is tangent to the planes defined normal vectors ⇒ Curve’s tangents lie planes Farin & Hansford The Essentials of CAGD 16 / 17

  17. Point-Normal Interpolation In B´ ezier form: b 0 = p 0 and b 3 = p 1 Infinitely many solutions for b 1 and b 2 One solution: Project b 3 into the plane defined by b 0 and n 0 1 This defines a tangent line at b 0 Place b 1 anywhere on this tangent 2 Could use method in previous section b 2 obtained analogously 3 Application: robotics – Path of a robot arm described as a piecewise curve – Point-normal pairs extracted from a surface – Desired curve intended to lie on the surface Farin & Hansford The Essentials of CAGD 17 / 17

Recommend


More recommend