The Essentials of CAGD Chapter 7: Working with Polynomial Patches 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 / 33
Outline Introduction to Working with Polynomial Patches 1 Bicubic Interpolation 2 Interpolation using Higher Degrees 3 Coons Patches 4 Bicubic Hermite Interpolation 5 Trimmed Patches 6 Least Squares Approximation 7 Farin & Hansford The Essentials of CAGD 2 / 33
Introduction to Working with Polynomial Patches Basic surface theory ⇒ several applications A B´ ezier surface trimmed by a ConS (Curve on a Surface) Farin & Hansford The Essentials of CAGD 3 / 33
Bicubic Interpolation Given: 16 points p i , j and associated parameter values ( u i , v j ) Find: Interpolating bicubic patch x ( u , v ) such that x ( u 0 , v 0 ) x ( u 0 , v 1 ) x ( u 0 , v 2 ) x ( u 0 , v 3 ) p 0 , 0 p 0 , 1 p 0 , 2 p 0 , 3 x ( u 1 , v 0 ) x ( u 1 , v 1 ) x ( u 1 , v 2 ) x ( u 1 , v 3 ) p 1 , 0 p 1 , 1 p 1 , 2 p 1 , 3 P = = x ( u 2 , v 0 ) x ( u 2 , v 1 ) x ( u 2 , v 2 ) x ( u 2 , v 3 ) p 2 , 0 p 2 , 1 p 2 , 2 p 2 , 3 x ( u 3 , v 0 ) x ( u 3 , v 1 ) x ( u 3 , v 2 ) x ( u 3 , v 3 ) p 3 , 0 p 3 , 1 p 3 , 2 p 3 , 3 Farin & Hansford The Essentials of CAGD 4 / 33
Bicubic Interpolation Recall that B 3 0 ( v 2 ) b 0 , 0 b 0 , 1 b 0 , 2 b 0 , 3 B 3 1 ( v 2 ) b 1 , 0 b 1 , 1 b 1 , 2 b 1 , 3 � B 3 B 3 B 3 B 3 � x ( u 1 , v 2 ) = 0 ( u 1 ) 1 ( u 1 ) 2 ( u 1 ) 3 ( u 1 ) B 3 2 ( v 2 ) b 2 , 0 b 2 , 1 b 2 , 2 b 2 , 3 B 3 b 3 , 0 b 3 , 1 b 3 , 2 b 3 , 3 3 ( v 2 ) Farin & Hansford The Essentials of CAGD 5 / 33
Bicubic Interpolation Interpolation problem written as P = M T B N B 3 B 3 B 3 B 3 0 ( u 0 ) 1 ( u 0 ) 2 ( u 0 ) 3 ( u 0 ) B 3 B 3 B 3 B 3 0 ( u 1 ) 1 ( u 1 ) 2 ( u 1 ) 3 ( u 1 ) M T = B 3 B 3 B 3 B 3 0 ( u 2 ) 1 ( u 2 ) 2 ( u 2 ) 3 ( u 2 ) B 3 B 3 B 3 B 3 0 ( u 3 ) 1 ( u 3 ) 2 ( u 3 ) 3 ( u 3 ) B 3 B 3 B 3 B 3 0 ( v 0 ) 0 ( v 1 ) 0 ( v 2 ) 0 ( v 3 ) B 3 B 3 B 3 B 3 1 ( v 0 ) 1 ( v 1 ) 1 ( v 2 ) 1 ( v 3 ) N = B 3 B 3 B 3 B 3 2 ( v 0 ) 2 ( v 1 ) 2 ( v 2 ) 2 ( v 3 ) B 3 B 3 B 3 B 3 3 ( v 0 ) 3 ( v 1 ) 3 ( v 2 ) 3 ( v 3 ) Farin & Hansford The Essentials of CAGD 6 / 33
Bicubic Interpolation P = M T B N Tensor Product Approach: Decompose into a sequence of linear systems C = M T B P = C N then Solve two sets of four systems – Example from each: � � � � p 1 , 0 p 1 , 1 p 1 , 2 p 1 , 3 = c 1 , 0 c 1 , 1 c 1 , 2 c 1 , 3 N c 0 , 1 b 0 , 1 c 1 , 1 b 1 , 1 = M T c 2 , 1 b 2 , 1 c 3 , 1 b 3 , 1 Farin & Hansford The Essentials of CAGD 7 / 33
Bicubic Interpolation Given p i , j depicted as triangles Step 2: C = M T B Step 1: P = C N Sketch error: the u- and v- parameter directions need to be reversed. Farin & Hansford The Essentials of CAGD 8 / 33
Bicubic Interpolation Direct approach: B = ( M T ) − 1 P N − 1 The tensor product approach is more efficient – Important for larger problems Farin & Hansford The Essentials of CAGD 9 / 33
Bicubic Interpolation Standard parameter selection: ( u 0 , u 1 , u 2 , u 3 ) = ( v 0 , v 1 , v 2 , v 3 ) = (0 , 1 / 3 , 2 / 3 , 1) Different values might improve the result – Requires effort – Must define improve Farin & Hansford The Essentials of CAGD 10 / 33
Interpolation using Higher Degrees Given: array of points with associated parameter values ( u i , v j ) . . . p 0 , 0 p 0 , n . . . . P = . . p m , 0 . . . p m , n Find: a B´ ezier patch x ( u , v ) = M T B N such that x ( u i , v j ) = p i , j b 0 , 0 . . . b 0 , n . . . . B = . . . . . b m , 0 b m , n Farin & Hansford The Essentials of CAGD 11 / 33
Interpolation using Higher Degrees P = M T B N Tensor product approach: C = M T B P = C N ⇒ – m + 1 linear systems for the rows of C – n + 1 linear systems for the columns of B Could use polynomials other than the Bernstein polynomials – Obtain the same interpolating surface High degree polynomials tend to oscillate – Just as in the curve case Farin & Hansford The Essentials of CAGD 12 / 33
Coons Patches A common practical situation: – Four boundary curves of a surface designed – Whole surface must be constructed S. Coons developed most widely used technique in the 1960s for Ford – Here: Boundary curves are B´ ezier curves Farin & Hansford The Essentials of CAGD 13 / 33
Coons Patches Given: Four boundary polygons As an array of points b i , j i = 0 . . . m , j = 0 . . . n Example: m = n = 3 b 0 , 0 b 0 , 1 b 0 , 2 b 0 , 3 b 1 , 0 b 1 , 3 b 2 , 0 b 2 , 3 b 3 , 0 b 3 , 1 b 3 , 2 b 3 , 3 Find: Missing (four) interior points –Depicted by squares Farin & Hansford The Essentials of CAGD 14 / 33
Coons Patches General Coons formula: Blend of two linear interpolations and one bilinear interpolation: b i , j = (1 − i m ) b 0 , j + i m b m , j + (1 − j n ) b i , 0 + j n b i , n � � 1 − j � � b 0 , 0 � b 0 , n 1 − i i � − n j m m b m , 0 b m , n n i = 1 . . . m − 1 j = 1 . . . n − 1 for and Farin & Hansford The Essentials of CAGD 15 / 33
Coons Patches Three building blocks for a Coons patch Farin & Hansford The Essentials of CAGD 16 / 33
Bicubic Hermite Interpolation Given : points, partials, and mixed partials x (0 , 0) x v (0 , 0) x v (0 , 1) x (0 , 1) x u (0 , 0) x uv (0 , 0) x uv (0 , 1) x u (0 , 1) x u (1 , 0) x uv (1 , 0) x uv (1 , 1) x u (1 , 1) x (1 , 0) x v (1 , 0) x v (1 , 1) x (1 , 1) Find : Interpolating cubic B´ ezier patch Farin & Hansford The Essentials of CAGD 17 / 33
Bicubic Hermite Interpolation 4 patch boundaries ⇒ 4 cubic Hermite curve interpolation problems b 0 , 0 = x (0 , 0) b 3 , 0 = x (1 , 0) b 0 , 1 = b 0 , 0 + 1 b 3 , 1 = b 3 , 0 + 1 3 x v (0 , 0) 3 x v (1 , 0) b 1 , 0 = b 0 , 0 + 1 b 2 , 0 = b 3 , 0 − 1 3 x u (0 , 0) 3 x u (1 , 0) b 0 , 3 = x (0 , 1) b 3 , 3 = x (1 , 1) b 0 , 2 = b 0 , 3 − 1 b 3 , 2 = b 3 , 3 − 1 3 x v (0 , 1) 3 x v (1 , 1) b 1 , 3 = b 0 , 3 + 1 b 2 , 3 = b 3 , 3 − 1 3 x u (0 , 1) 3 x u (1 , 1) Farin & Hansford The Essentials of CAGD 18 / 33
Bicubic Hermite Interpolation Interior control points found using the twist vector data x uv (0 , 0) = 9[ b 1 , 1 − b 1 , 0 − b 0 , 1 + b 0 , 0 ] Solve for b 1 , 1 : b 1 , 1 = 1 9 x uv (0 , 0) + b 0 , 1 + b 1 , 0 − b 0 , 0 At other corners: b 2 , 1 = − 1 9 x uv (1 , 0) + b 3 , 1 − b 3 , 0 + b 2 , 0 b 1 , 2 = − 1 9 x uv (0 , 1) + b 1 , 3 − b 0 , 3 + b 0 , 2 b 2 , 2 = 1 9 x uv (1 , 1) − b 3 , 3 + b 2 , 3 + b 3 , 2 Farin & Hansford The Essentials of CAGD 19 / 33
Bicubic Hermite Interpolation A bicubic B´ ezier patch with zero twists Twist data can be difficult to create – Coons solution to given boundary data easier construction Farin & Hansford The Essentials of CAGD 20 / 33
Trimmed Patches Parametric curve ( u ( t ) , v ( t )) in the domain of surface x ( u , v ) Mapped to a curve on the surface ConS x ( u ( t ) , v ( t )) Farin & Hansford The Essentials of CAGD 21 / 33
Trimmed Patches ConS application: trimmed surfaces Areas marked as “invalid” or “invisible” Example: – Given two planes – Blending surface between them – Dashed parts of planes “invisible” Farin & Hansford The Essentials of CAGD 22 / 33
Trimmed Patches Degree p domain curve mapped onto a degree m × n surface x ( u , v ) ⇒ Degree ( m + n ) p ConS (in general) Isoparametric line in domain ⇒ Degree m or n isoparametric ConS Farin & Hansford The Essentials of CAGD 23 / 33
Trimmed Patches Closed domain curve divides domain into two parts Closed ConS divides the surface into two parts Problem: Is domain point ( u , v ) inside the domain curve? Solution: – Construct arbitrary ray emanating from ( u , v ) – Count number intersections with all domain curves and boundary (Tangencies count as 2 intersections) – Even: outside Odd : inside Farin & Hansford The Essentials of CAGD 24 / 33
Trimmed Patches Orientation of trim curves – Inside trim curves clockwise – Outer-boundary is counterclockwise Farin & Hansford The Essentials of CAGD 25 / 33
Trimmed Patches Trimmed surfaces are a bread-and-butter tool in all CAD/CAM systems Arise in many applications Most common: intersection between two surfaces – Resulting intersection curve is a ConS on either of the two surfaces Farin & Hansford The Essentials of CAGD 26 / 33
Least Squares Approximation Given: set of points k = 0 , . . . K − 1 p k – Not on a rectangular grid aligned with patch boundaries Example: points from laser digitizer – Number of points can be large For each p k need corresponding parameter pair ( u k , v k ) Farin & Hansford The Essentials of CAGD 27 / 33
Recommend
More recommend