1 / 15

3D objects representation and data structure

This lecture discusses the representation and data structure of 3D objects, including internal and external data structures, vertex and edge lists, winged-edge structure, and plane equations. It emphasizes the need for a suitable data structure for both display and application purposes.

ecleghorn
Download Presentation

3D objects representation and data structure

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3D objects representation and data structure Dr Nicolas Holzschuch University of Cape Town e-mail: holzschu@cs.uct.ac.za Modified by Longin Jan Latecki latecki@temple.edu Sep. 18, 2002

  2. Map of the lecture • Object representations in 3D • internal/external • Data structure • vertex list, edge list, winged edge • Plane equation • computing the plane equation

  3. Objects representation • In application model • Will be modified by the application • Ultimately, will be send for display • Must be adapted for both tasks

  4. Sending to display • Need the list of faces, with list of vertices for each face • Redundant information not a problem • one vertex may appear several times • Neighboring information not needed • Data structure: • list of faces • list of vertices for each face

  5. Access by the application • Modification of the application model • moving vertices • adding new faces • adding new vertices • redundant information is excluded • Needs neighboring information • for coloring • for computing average normals (shading)

  6. Internal vs. external • External data structure: • used for display • can be very simple • Internal data structure • will have complex manipulations • must provide for these manipulations

  7. Vertex list • List of faces • For each face: • list of pointers to vertices • Good points: • redundancy removed. Space saved. • Bad points: • find which polygons share an edge, or a given vertex?

  8. Edge list • For each face: • list of pointers to edges • For each edge: • the two polygons sharing it • the two vertices • Neighboring information available • faces adjacent to an edge

  9. Edge list: shortcomings • List of polygons sharing a vertex? • I move a vertex: • I need to find which edges share this vertex • must go through the whole list • I add a face, an edge: • must go through the whole list

  10. Winged-edge data structure E2 Polygon 1 V1 E4 Edge 1 V2 E3 Polygon 2 E5

  11. Winged-edge data structure • Each vertex also has a pointer to one of its edges • Each face has a pointer to one of its edges • Efficient: • faces adjacent to one vertex • edges adjacent to one vertex

  12. Plane equation • Each face is a planar polygon • Plane equation: ax+by+cz+d = 0 • Normal to the plane: (a,b,c) • Finding the equation?

  13. Finding a plane equation • Plane defined by three points: P1,P2,P3 • First, find the normal: n = P1P2 ^ P1P3 • If n=0? then it isn’t a plane • n gives a,b and c • Find d using P1

  14. Using a plane equation • n is fundamental: • defines a front and a back • M is in front of the plane: P1M•n³ 0 • M is behind the plane: P1M•n£ 0 • Same classification using the equation: ax+by+cz+d ³ 0

  15. 3D objects: conclusion • Data structure essential • must be adapted to the task • trivial data structure sufficient for display • more complex data structure required for application • Plane equation

More Related