Computer Graphics SS 2014 Geometric Models - I
270 likes | 382 Views
Learn about geometric models, polygon representation, polygon meshes, and their properties in computer graphics. Explore Euler's formula, approximation methods, and mesh representations in this comprehensive guide.
Computer Graphics SS 2014 Geometric Models - I
E N D
Presentation Transcript
Computer Graphics SS 2014 Geometric Models - I Rüdiger Westermann Lehrstuhl für Computer Graphik und Visualisierung
Object representation • In computergraphicsweusually deal withpolygonal approximationsofcontinuousobjects
Object representation • What is a polygon? • It consists of points, typically in 3D-space ℝ3 • A point is represented by its x,y,z-coordinates; it is called a vertex • Points areconnected via linesegments (edges) • Line segments are specified in terms of the vertices at their endpoints • A polygon is the interior of a closed planar connected series of line segments • The edges do not cross each other and exactly two edges meet at every vertex
Object representation • What is a polygon? concave convex
Object representation • What is a polygon mesh? • Objects are typically considered to be hollow • They are modelled by a (closed) surface composed of polygons (faces) – the boundary representation (B-Rep) or surface mesh • i.e., objects are modelled aspolyhedra
Object representation • Types of polygon meshes • Triangle meshes and quad meshes
Object representation • A polygon mesh must satisfy the following criteria • The intersection of two polygons is either empty, or a common vertex, or a common edge Not allowed Allowed Facesoverlap T-vertex
Objectrepresentation • We only consider 2-manifoldmeshes • A mesh where every edge must be shared by exactly 2 faces, except the border edges
1 2 7 3 6 4 5 Polygon meshes • Polygon meshes and graphs • A graph is a 2-tupel <V,E> • V: the set of nodes • E: the set of edges connecting two nodes • A planargraph:Graph whose vertices and edgescan be embedded in ℝ2such that its edges do not intersect • A plane graph: A planargraphdrawn in a plane nonplanar planar
Polygon meshes • Polygon meshes and graphs • A connected planar graph is a 2-tupel <V,E> • V: the set of nodes • E: the set of edges connecting two nodes • All nodes are connected via a path along the edges • F: the faces (Gebiete) are the connected parts of the plane, which emerge when cutting the plane along the edges • Triangulation: graph where every face is a triangle. • Euler’s Formula: V − E + F = 2 • Every convex polyhedron can be turned into a connected planar graph • Ie, Euler’s Formula holds as well
Polygon meshes • Polygon meshes and graphs • n-ring of a node is the set of nodes for which a path to that node of length n exist • Valence of a node is the number of adjacent edges (= number of adjacent nodes) 2-ring 1-ring
Polygon meshes • Polygon meshes and graphs • Seeing polygon meshes as graphs allows transforming problems on meshes into graph theoretical problems • Shortest path along edges from one vertex to another • Does a path exist along which every vertex is visited exactly once • How many edges E can a triangle mesh of V vertices have 3F = 2E⇒E≈ 3V, F≈ 2V • What is the average valence of the vertices in a triangle mesh ⇒ < 6 (< 4 in a mesh of quadrilaterals)
Polygon meshes • Genus of a polyhedron • Genus: Maximal number of closed cutting curves that do not disconnect the graph into multiple components. • Ie. the number of holes or handles Genus 0 Genus 1 Genus 2 Genus 3
Polygon meshes • Euler-Poincare Formula • For a closed polygonal mesh of genus g, the relation of the number V of vertices, E of edges, and F of faces is givenV - E + F = 2(1-g) • The term χ= 2(1-g) is called the Euler characteristic χ= 2 χ= 0 χ= -2 χ= -4
Polygon meshes • Euler-Poincare FormulaV = 3890E = 11664F = 7776Genus 0, χ= 2
Polygon meshes • Genus 1, χ= 0knot
Example: Approximationsofa curve Different approximationsof a sphere Polygon meshes • A polygonal approximation is an approximation of a continuous surface by a polygon mesh
Polygon meshes • A polygonal approximation typically consists of a discrete set of points of the continuous surface, which are connected via edges • Constructing the connectivity (edges) for a given set of points is called triangulation
Polygon meshes • Approximation propertiesof polygonal approximations • Forpiecewise linear approximationstheerrorbetweentheapproximationandthesurfaceis Error goes down asweincreasethenumberofinterpolationpoints; errordecreasesasthesizeofthesquareoftheinterval
Polygon meshes • Polygonal approximation are typically adaptive, i.e., more/smaller polygons are used in regions of high curvature (“high ”)
Polygon meshes • Adaptive polygonal/polyhedral approximations
Polygon meshrepresentation • Triangle mesh representation • Geometry:where are the vertices positioned • (Polygon-)topology: how are the vertices connected • (Mesh-)topology: how are the polygons connected • Explicitrepresentation (Face Set; STL files):store three vertices for each of the n triangles n*3*3 = 9n floats • High redundancy • 36 B/f = 72 B/v • no connectivity!
Polygon meshrepresentation • Triangle mesh representation • Shared vertex („indexed face set“) representation (OBJ, OFF files) • Array of coordinates of all vertices (3n floats) • Array of triangles with indices into the vertex list (3n integers) • 12 B/v + 12 B/f = 36 B/v • Use, eg. Meshlab, to view .obj files http://meshlab.sourceforge.net/
Polygon meshrepresentation • Indexed face set representation • Less redundancy than explicit representation • Separationof geometry and (polygon-)topology • More efficient computations on surfaces • Mesh operators still difficult to realize • Think about how to implement the operation to find all 1-ring neighbors
Polygon meshrepresentation • Extendedshared vertex representation (Face-Based Connectivity): • Array of vertices, each with a reference to one adjacent triangle: 3n floats + 1n integers • Array of triangles, each with references to 3 vertices and face neighbours (adjacent triangles) (at the border: -1): 6n integers • 16 B/v + 24 B/f = 64 B/v
VEND Polygon meshrepresentation ENCW EPCCW • Edge-Based Connectivity: • Winged Edge data structure (Baumgart94) • Arrays ofEdges(primary key): • start (VSTART) and end (VEND) vertices • two adjacent faces (FCW and FCCW) • preceding and next edges in one face (EPCW and ENCW) • preceding and next edges in other face (EPCCW and ENCCW) Vertices (key): position, one adjacent edgeFaces (key): one adjacent edge • 120 Byte/v FCCW FCW EPCW ENCCW VSTART
Polygon meshrepresentation • On board example