the essentials of cagd
play

The Essentials of CAGD Chapter 1: The Bare Basics Gerald Farin - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 1: The Bare Basics 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 1: The Bare Basics 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 / 24

  2. Outline Introduction to The Bare Basics 1 Points and Vectors 2 Operations on Points and Vectors 3 Products 4 Affine Maps 5 Triangles and Tetrahedra 6 Farin & Hansford The Essentials of CAGD 2 / 24

  3. Introduction to The Bare Basics A bare basic affine mapping of a vector Goals: – Introduce basic geometry – Notation Farin & Hansford The Essentials of CAGD 3 / 24

  4. Points and Vectors Geometry in two dimensions 2D � 0 � � 1 � � 0 � 0 = e 1 = e 2 = 0 0 1 For a 3D space ... Farin & Hansford The Essentials of CAGD 4 / 24

  5. Points and Vectors Point – Denotes a 2D or 3D location – Lower case boldface letters � 1 � p = 2 – Coordinates � p x � � p 1 � or p y p 2 Affine space or Euclidean space E 2 Farin & Hansford The Essentials of CAGD 5 / 24

  6. Points and Vectors Vector: difference of two points  2   1   − 1   =  − v = 2 2 0     0 1 1 – Lower case boldface – Components     v x v 1 v y or v 2     v z v 3 Linear space or Real space R 3 Farin & Hansford The Essentials of CAGD 6 / 24

  7. Points and Vectors Affine/Euclidean and linear/real spaces Farin & Hansford The Essentials of CAGD 7 / 24

  8. Operations on Points and Vectors Translation – Moves the point by a displacement – Displacement defined by a vector ˆ p = p + v No effect on vectors Farin & Hansford The Essentials of CAGD 8 / 24

  9. Operations on Points and Vectors Adding points and vectors For vectors: Linear combination v = α 1 v 1 + α 2 v 2 + . . . + α n v n , α 1 , . . . , α n ∈ R For points: barycentric combination p = α 1 p 1 + . . . + α n p n , α 1 + . . . + α n = 1 What barycentric combination results in the midpoint of two points? x = α p + β q α + β = 1 Farin & Hansford The Essentials of CAGD 9 / 24

  10. Operations on Points and Vectors Barycentric coordinates are invariant under translations ( α p + β q ) + v = α ( p + v ) + β ( q + v ) Sketch illustrates midpoint � 0 � � 1 � p = and q = 1 1 � 2 � Translation vector v = 2 Farin & Hansford The Essentials of CAGD 10 / 24

  11. Operations on Points and Vectors The problem with non-barycentric combinations � 0 � � 1 � p = and q = 1 1 � 1 � x = 2 p + q = 3 � 2 � Translation vector v = 2 � 2 � � 3 � � 3 � ˆ p = ˆ q = x + v = , , 3 3 5 � 7 � ˆ x = 2ˆ p + ˆ q = � = x + v ! 9 Farin & Hansford The Essentials of CAGD 11 / 24

  12. Operations on Points and Vectors Ratio of three (ordered) points ratio( p , x , q ) = � x − p � � q − x � Ratios and barycentric coordinates: x = a p + b q where a + b = 1 ratio( p , x , q ) = b : a = b a What if x not between p and q ? Farin & Hansford The Essentials of CAGD 12 / 24

  13. Products Dot product or scalar product of vectors v and w 2D: v · w = v x w x + v y w y 3D: v · w = v x w x + v y w y + v z w z Angle α between v and w : v · w cos( α ) = � v �� w � � v � = √ v · v Length of a vector: When is v · w = 0? Farin & Hansford The Essentials of CAGD 13 / 24

  14. Products Cross product or vector product   v y w z − v z w y v ∧ w = v z w x − v x w z   v x w y − v y w x Cross product of two vectors is perpendicular to both of them Farin & Hansford The Essentials of CAGD 14 / 24

  15. Products Area of parallelogram spanned by v and w � v ∧ w � = � v �� w � sin( α ) Application: area of a triangle When is v ∧ w = 0 ? Cross products are antisymmetric v ∧ w = − w ∧ v Farin & Hansford The Essentials of CAGD 15 / 24

  16. Affine Maps Used to move or modify a geometric figure Given: p ∈ E 2 and affine map defined by 2 × 2 matrix A and v ∈ R 2 ∈ E 2 p = A p + v ˆ (with help of origin point) A represents a linear map � 2 0 � � 1 0 � � 1 0 � scale: reflection: projection: 0 2 0 − 1 0 0 � cos( α ) − sin( α ) � � 1 3 � rotation: shear: sin( α ) cos( α ) 0 1 How would you define a 3D affine map? Farin & Hansford The Essentials of CAGD 16 / 24

  17. Affine Maps Example Three collinear 2D points � 0 � � 1 � � 2 � − 1 0 1 Affine map � 1 � � 0 � 1 x = ˆ x + 0 1 1 Images of points � − 1 � � 1 � � 3 � 0 1 2 Midpoint mapped to midpoint! Farin & Hansford The Essentials of CAGD 17 / 24

  18. Affine Maps Properties: • Map points to points, lines to lines, and planes to planes • Leave the ratio of three collinear points unchanged • Parallel lines to parallel lines – Two parallel lines mapped to ... – Two non-intersecting lines mapped to ... • Planes ... Farin & Hansford The Essentials of CAGD 18 / 24

  19. Triangles and Tetrahedra 2D triangle T formed by three noncollinear points a , b , c Triangle area computed using a 3 × 3 determinant: � � 1 1 1 � � � � area( a , b , c ) = 1 1 1 1 � = 1 � � � � a x b x c x � � � � a b c 2 2 � � � a y b y c y � � Farin & Hansford The Essentials of CAGD 19 / 24

  20. Triangles and Tetrahedra Given p inside T Write p as a combination of the triangle vertices p = u a + v b + w c Combination of points ⇒ barycentric combination Find u , v , w by solving 3 equations in 3 unknowns Farin & Hansford The Essentials of CAGD 20 / 24

  21. Triangles and Tetrahedra u = area( p , b , c ) area( a , b , c ) v = area( p , c , a ) area( a , b , c ) w = area( p , a , b ) area( a , b , c ) barycentric coordinates u = ( u , v , w ) Farin & Hansford The Essentials of CAGD 21 / 24

  22. Triangles and Tetrahedra Barycentric coordinates not independent of each other – e.g., w = 1 − u − v Behave much like “normal” coordinates: – If p is given, can find u – If u is given, can find p Not necessary that p be inside T – Need signed area 3 vertices of the triangle have barycentric coordinates a ∼ b ∼ c ∼ = (1 , 0 , 0) = (0 , 1 , 0) = (0 , 0 , 1) A triangle may also be defined in 3D area( a , b , c ) = 1 2 � [ b − a ] ∧ [ c − a ] � Farin & Hansford The Essentials of CAGD 22 / 24

  23. Triangles and Tetrahedra Example:       0 0 1 a = 0 b = 2 c = 0       − 1 0 3     0 1 b − a = − 2 c − a = 0     1 4   8 v = ( b − a ) ∧ ( c − a ) = 1   − 2 √ 69 area ( a , b , c ) = 2 Farin & Hansford The Essentials of CAGD 23 / 24

  24. Triangles and Tetrahedra Tetrahedron: four 3D points p 1 , p 2 , p 3 , p 4 vol( p 1 , p 2 , p 3 , p 4 ) = 1 � � 1 1 1 1 � � � � p 1 p 2 p 3 p 4 6 � � Example:         0 2 3 1  p 2 =  p 3 =  p 4 = p 1 = 0 0 3 1      0 0 0 2 � � 1 1 1 1 � � � � vol = 1 0 2 3 1 � � = 2 � � 0 0 3 1 6 � � � � 0 0 0 2 � � Farin & Hansford The Essentials of CAGD 24 / 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend