360 likes | 920 Views
Polygonal Mesh – Data Structure and Smoothing. Chiew-Lan Tai. What is a Mesh?. What is a Mesh?. A Mesh is a pair (P,K) , where P is a set of point positions and K is an abstract simplicial complex which contains all topological information.
E N D
Polygonal Mesh –Data Structure and Smoothing Chiew-Lan Tai
What is a Mesh? • A Mesh is a pair (P,K), where P is a set of point positions and K is an abstract simplicial complex which contains all topological information. • K is a set of subsets of : • Vertices • Edges • Faces
What is a Mesh? • Each edge must belong to at least one face, i.e. • Each vertex must belong to at least one edge, i.e. • An edge is a boundary edge if it only belongs to one face
What is a Mesh? • A mesh is a manifold if • Every edge is adjacent to one (boundary) or two faces • For every vertex, its adjacent polygons form a disk (internal vertex) or a half-disk (boundary vertex) Manifold Non-manifold • A mesh is a polyhedron if • It is a manifold mesh and it is closed (no boundary) • Every vertex belongs to a cyclically ordered set of faces (local shape is a disk)
Orientation of Faces • Each face can be assigned an orientation by defining the ordering of its vertices • Orientation can be clockwise or counter-clockwise. • The orientation determines the normal direction of face. Usually counterclockwise order is the “front” side.
Orientation of Faces • A mesh is well oriented (orientable) if all faces can be oriented consistently (all CCW or all CW) such that each edge has two opposite orientations for its two adjacent faces • Not every mesh can be well oriented.e.g. Klein bottle, Möbius strip non-orientable surfaces
Euler Formula • The relation between the number of vertices, edges, and faces. • where • V : number of vertices • E : number of edges • F : number of faces
Euler Formula • Tetrahedron • V = 4 • E = 6 • F = 4 • 4 - 6 + 4 = 2 • Cube • V = 8 • E = 12 • F = 6 • 8 -12 + 6 = 2 • Octahedron • V = 6 • E = 12 • F = 8 • 6 -12 + 8 = 2 • V = 8 • E = 12 + 1 = 13 • F = 6 + 1 = 7 • 8 - 13 + 7 = 2 • V = 8 • E = 12 • F = 6 • 8 - 12 + 6 = 2
Euler Formula • More general rule • where • V : number of vertices • E : number of edges • F : number of faces • C : number of connected components • G : number of genus (holes, handles) • B : number of boundary loops • V = 16 • E = 32 • F = 16 • C = 1 • G = 1 • B = 0 • 16 – 32 + 16 = 2 (1 - 1) - 0
Neighborhood Relations • For a vertex • All neighboring vertices • All neighboring edges • All neighboring faces • Knowing some types of relation,we can discover other (but not necessary all)topological information • e.g. if in addition to VV, VE and VF, we know neighboring vertices of a face, we can discover all neighboring edges of the face
Choice of Data Structure • Criteria for choosing a particular data structure • Size of mesh (# of vertices and faces) • Speed and memory of computer • Types of meshes (triangles only, arbitrary polygons) • Redundancy of data • Operations to be preformed (see next slide) • Tradeoff between updating and query • More redundancy of data, faster query but slower updating
Choice of Data Structure • Face-based data structure • Problem: different topological structure for triangles and quadrangles • Edge-based data structure • Winged-edge data structure • Problem: traveling the neighborhood requires one case distinction • Half-edge data structure • Aka doubly connected edge list (DCEL)
Half-Edge Data Structure • Each edge is divided into two half-edges • Each half-edge has 5 references: • The faceon left side (assume counter-clockwise order) • Previous and next half-edge in counterclockwise order • The “twin” edge • The starting vertex • Each face has a pointer to one of its edges • Each vertex has a pointer to a half edge that has this vertex as the start vertex
Half-Edge Data Structure • Here is another view of half-edge data structure. • Next pointers provide links around each face in counterclockwise (prev pointers can be used to go around in clockwise) • Example: finding all verticesadjacent to vertex v. /* Assume closed mesh and using counterclockwise order */ HalfEdge he = v.he;HalfEdge curr = he;output (curr.twin.start);while (curr.twin.next != he) { curr = curr.twin.next; output (curr.twin.start);}
References • Taubin, A signal processing approach to fair surface design, Siggraph 95. • Kobbelt et al., Interactive multi-resolution modeling on arbitrary meshes, Siggraph 98 • Desbrun et al. Implicit fairing of irregular meshes using diffusion and curvature flow, Siggraph 99
Fairing operators for meshes • Umbrella [Kobbelt98] • Improved umbrella [Desbrun99] • Taubin l|m [Taubin95] • Curvature flow [Desbrun99] • etc …
Definition: 1-ring Neighbors of a Vertex p1 pn p p2 1-ring neighbors of p, N1(p)={p1,p2,…, pn} Valence of p is n ...
General Idea • Predict a vertex position from its neighbor • for a vertex vi and its neighbor vj, let the weight be wij such that • For vertex vi, predict • Iterate through all vertices and update the positions where Is a specific normalized curvature operator, is a damping factor
General idea In matrix form: X = - K X where K = I - W • Explicit updating – find each and update each
Umbrella Operator • Pros: simple, fast; work well for meshes with small variation in edge length and face angles • Cons: • for irregular connectivity meshes lead to artifacts • weights only based on the connectivity, not the geometry (e.g., edge length, face area, angle between edges) • vertex drifting problem, smoothing affects parametrization, not just geometry
Improved Umbrella Operator • Scale-dependent umbrella operator • Still has a non-zero tangential component that causes vertex drifting • Discussion: no longer linear (linearized by assuming the edge lengths do not change during one smoothing round)
Curvature Flow Operator • A noise removal procedure that does not depend on parametrization • Vertices move along the surface normal with a speed equal to the mean curvature • Geometry is smoothed without affecting the sampling rate aj xi xj bj
Curvature Flow Operator • Vertices can only move along their normal • no vertex drifting in parameter space
Extensions and Applications • Volume preservation • Fairing meshes with constraints • Stopband filters and enhancement • Multiresolution editing of arbitrary meshes • Non-uniform subdivision • Mesh edge detection • Fairing of non-manifold models