the essentials of cagd
play

The Essentials of CAGD Chapter 2: Lines and Planes Gerald Farin - PowerPoint PPT Presentation

The Essentials of CAGD Chapter 2: Lines and Planes 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 2: Lines and Planes 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 / 27

  2. Outline Introduction to Lines and Planes 1 Linear Interpolation 2 Line Forms 3 Planes 4 Linear Pieces: Polygons 5 Linear Pieces: Triangulations 6 Working with Triangulations 7 Farin & Hansford The Essentials of CAGD 2 / 27

  3. Introduction to Lines and Planes Building blocks of polygons and triangles Fundamental operation: Linear interpolation Triangulation of the “Stanford bunny” Farin & Hansford The Essentials of CAGD 3 / 27

  4. Linear Interpolation Points p and q define a line How can we describe all points on this line? Imagine a particle x traversing the line Where is x ( t ) at any given time t ? Want x (0) = p and x (1) = q x ( t ) = (1 − t ) p + t q This is the parametric form of a line with parameter t What is t corresponds to the midpoint of the line segment? Farin & Hansford The Essentials of CAGD 4 / 27

  5. Linear Interpolation Example � 20 � � − 10 � p = q = 2 − 10 At t = 1 3 : x (1 3) = 2 3 p + 1 � 10 � 3 q = − 2 Domain is real numbers Range of the map is x ( t ) Also: preimage, image Farin & Hansford The Essentials of CAGD 5 / 27

  6. Linear Interpolation Linear interpolation is an affine map – Ratios preserved t t ratio(0 , t , 1) = and ratio( p , x ( t ) , q ) = 1 − t 1 − t Farin & Hansford The Essentials of CAGD 6 / 27

  7. Linear Interpolation 3D parametric line Parameter t not restricted to [0 , 1] Example     1 − 1 p = 1 q = 1     − 1 2 At t = − 1:  3  x ( − 1) = 2 p − q = 1   − 4 Farin & Hansford The Essentials of CAGD 7 / 27

  8. Linear Interpolation Line segment between p and q over parameter interval [ a , b ] Parameter transformation: affine map taking u ∈ [ a , b ] to t ∈ [0 , 1] t = u − a 1 − t = b − u and b − a b − a Global parameter u and Local parameter t Farin & Hansford The Essentials of CAGD 8 / 27

  9. Linear Interpolation Example � 1900 � � 2000 � p = q = 1 K 100 K What is the data point for the year 1990? The year 1990 is a global parameter The local parameter for the line through p and q : t = 1990 − 1900 2000 − 1900 = 9 10 The data point for 1990: � 1990 x ( 9 10) = 1 10 p + 9 � 10 q = 90100 Farin & Hansford The Essentials of CAGD 9 / 27

  10. Line Forms Parametric form: x ( t ) = (1 − t ) p + t q Explicit form: y = ax + b ( a is the slope, b is the y -intercept) Parametric form is more general What is explicit form of line through points � 0 � � 0 � and ? 0 1 No explicit 3D line form Farin & Hansford The Essentials of CAGD 10 / 27

  11. Line Forms Convert explicit to parametric: – Choose any two points on the line ... � x ( t ) � � 0 � � � 1 x ( t ) = = (1 − t ) + t y ( t ) a + b b Rewrite parametric form: x ( t ) = p + t ( q − p ) Let v = q − p and v ⊥ perpendicular to v v ⊥ [ x − p ] = 0 Point–normal form: � x � Let x = then point–normal form transformed to y Implicit form: ax + by = c Farin & Hansford The Essentials of CAGD 11 / 27

  12. Line Forms Example Given implicit line 3 x − 2 y = 1 Are the following points on the line? � 1 � � − 1 � p 1 = p 2 = 1 1 Sketch the implicit line using parametric form x ( t ) = p + t v p = p 1 � 3 � � 2 � v ⊥ = ⇒ v = − 2 3 Farin & Hansford The Essentials of CAGD 12 / 27

  13. Planes Plane defined by three noncollinear points p , q , r Point x in plane: x = u p + v q + w r where u + v + w = 1 Volume of tetrahedron: � � vol( p , q , r , x ) = 1 1 1 1 1 � � � = 0 � � p q r x 6 � Why? Tetrahedron with zero volume is a plane ⇒ x is in the plane spanned by p , q , r Farin & Hansford The Essentials of CAGD 13 / 27

  14. Planes Point–vector form of a plane x = u p + v q + w r = r + u ( p − r ) + v ( q − r ) Implicit form: Vector orthogonal ( normal ) to the plane n = [ p − r ] ∧ [ q − r ] Point–normal form: for any point x in the plane n [ x − r ] = 0 Transformed to   x ax + by + cz = d where x = y   z Which form best form for { testing if, calculating } x in the plane? Farin & Hansford The Essentials of CAGD 14 / 27

  15. Planes Example Given: three points       1 0 1 p = 0 q = 1 r = 1       1 1 0 Find: implicit plane through points   − 1 n = [ p − r ] ∧ [ q − r ] = − 1   − 1     − 1 x − 1  ·  = 0 − 1 y − 1   − 1 z x + y + z = 2 Farin & Hansford The Essentials of CAGD 15 / 27

  16. Linear Pieces: Polygons Vertices: p 1 , . . . , p N Edges p i to p i +1 Polygons may be open or closed Farin & Hansford The Essentials of CAGD 16 / 27

  17. Linear Pieces: Polygons Closed polygons classified as convex or nonconvex Convexity tests: 1. “Rubberband” test Convex hull: area enclosed by rubberband 2. Line segment inclusion test Farin & Hansford The Essentials of CAGD 17 / 27

  18. Linear Pieces: Triangulations Most fundamental entity in computer graphics: triangles Most rendering boils down to determining how a triangular facet interacts with the lighting model CAD/CAM has historically used triangles as a centerpiece geometric entity for computations such as tool paths and finite element analysis (FEM) – The reason: computations are very simple and fast Farin & Hansford The Essentials of CAGD 18 / 27

  19. Linear Pieces: Triangulations Triangulations can be generated through the use of laser digitizers – Scan an object using laser rays – Scanning generates x , y , z coordinates of points – Software creates triangulation Resulting triangulations tend to be large (100K + triangles) – “Digital Michelangelo” Project (2B triangles) Farin & Hansford The Essentials of CAGD 19 / 27

  20. Linear Pieces: Triangulations Triangulation: a set of triangles connecting a set of points in 2D or 3D A triangulation must satisfy the following conditions: 1. Vertices of triangles consist of given points 2. Interiors of any two triangles do not intersect 3. If two triangles not disjoint, then share a vertex or have coinciding edge 4. All triangles oriented consistently – “outward” normals Farin & Hansford The Essentials of CAGD 20 / 27

  21. Linear Pieces: Triangulations Many possibilities for a data structure – might include • A point list • A triangle list • A neighbor list Application dictates optimal data structure Bad example: STL (Stereo Lithography Language) – Data points listed multiply – Each triangle is given explicitly by its vertices – No neighbor information is given Farin & Hansford The Essentials of CAGD 21 / 27

  22. Linear Pieces: Triangulations Point list: p 0 , p 1 , p 2 , p 3 , p 4 , p 5 , p 6 The triangle and neighbor lists: triangle vertices neighbors 0 1 , 6 , 4 5 , − 1 , 2 1 5 , 0 , 3, − 1 , 3 , − 1 2 1 , 2 , 6 4 , 0 , − 1 3 5 , 3 , 6 5 , 4 , 1 4 2 , 5 , 6 3 , 2 , − 1 5 4 , 6 , 3 3 , − 1 , 0 Farin & Hansford The Essentials of CAGD 22 / 27

  23. Working with Triangulations Problem: Triangulation too dense for efficient representation Decimation: Reduction in size of a triangulation Remove as many triangles as possible while staying as close to the initial triangulation Basic idea: If multiple triangles part of one plane then replace by fewer triangles – Planarity tolerance Farin & Hansford The Essentials of CAGD 23 / 27

  24. Working with Triangulations Edge Collapse Decimation: Reduce the number of triangles by collapsing an edge – See previous Sketch: Marked edge collapsed to midpoint – Number of triangles reduced – Valid triangulation maintained – Repeat ... Farin & Hansford The Essentials of CAGD 24 / 27

  25. Working with Triangulations Star p ⋆ of a point p : Set of all triangles having p as a vertex p ⋆ 6 consists triangles 0 , 2 , 3 , 4 , 5 Farin & Hansford The Essentials of CAGD 25 / 27

  26. Working with Triangulations Edge collapse with a plane-based flatness test: Triangulation edge p and q Check if all triangles formed by p ⋆ ∪ q ⋆ are sufficiently planar – Form plane from centroid point and average normal – All points within a given tolerance to this plane? Yes: collapse edge Farin & Hansford The Essentials of CAGD 26 / 27

  27. Working with Triangulations Multiresolution representation: Fine to coarse triangulations Application: transmission through the internet Farin & Hansford The Essentials of CAGD 27 / 27

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