How to Make Good Meshes - PowerPoint PPT Presentation

1 / 15
About This Presentation
Title:

How to Make Good Meshes

Description:

Quad-Edge. Half-Edge. Double-Linked-Face-List. Guibas & Stolfi. ... Quad-Edge Operators. Edge e orientation and direction. Orientation is surface normal ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 16
Provided by: csAri
Category:
Tags: good | make | meshes | quad

less

Transcript and Presenter's Notes

Title: How to Make Good Meshes


1
How to Make Good Meshes
  • John C. Hart
  • CS 319
  • Advanced Topics in Computer Graphics

2
Meshing
  • Properties
  • Manifold
  • Delaunay
  • Representations
  • Winged-Edge
  • Quad-Edge
  • Half-Edge
  • Double-Linked-Face-List

Guibas Stolfi. Primitives for the Manipulation
of General Subdivisionsand the Computation of
Voronoi Diagrams. TOG 4(2), Apr. 1985, pp.
74-123.
3
Manifolds
  • Let M be a surface in 3-D
  • M is a manifold iff a neighborhood of any point x
    in M is topologically equivalent to the unit disk
  • Topologically equivalence allows deformation that
    does not rip, tear or poke holes
  • Also called homeomorphism
  • deformation is 1-1, onto and bicontinuous
  • Need not be differentiable

good
bad
4
Piecewise Linear Manifolds
  • Closed mesh
  • No dangling faces
  • Watertight
  • no holes in the surface
  • no boundary
  • orientable
  • Edges only bound two faces
  • Eulers formula
  • V E F 2(C G)
  • C of components
  • G genus ( of donut holes)

good
bad
5
Delaunay Triangulation
  • Any number of ways to connect scattered points in
    plane with edges
  • Creates a good looking mesh
  • Triangle face ABC is in Delaunay triangulation
    iff circumcircle of every face contains no other
    vertex
  • Also Delauney iff every edge has some circle
    passing through its endpoints that contains no
    other vertex
  • Rhymes with baloney

6
Building Delaunay Triangulations
  • Let L and R be two sets of vertices.
  • Let TL, TR, and T be the Delaunay triangulations
    of L, R and L ? R.
  • Any edge in T whose endpoints are both in L is in
    TL.
  • No new edges added
  • TL not a subset of T
  • Any edge in T that is not also in TL nor TR has
    one endpoint in L and one endpoint in R.
  • New edges between L and R
  • TL, TR not subsets of T

7
CircumcircleTest
  • The point P is in the circumcircle of triangle
    ABC iff D(A,B,C,P) gt 0
  • Assume A,B,C,P cocircular with center x,y and
    radius r
  • Then (xA x)2 (yA y)2 r2 and likewise for
    B,C and P
  • Which is equivalent to2xxA2yyA(xA2yA2)(x2y2
    r2) 0and likewise for B,C and P
  • Equations are linearly dependent

z x2 y2
8
Indexed Face Set
(x3,y3,z3)
(x2,y2,z2)
  • Popular file format
  • VRML, Wavefront, etc.
  • Ordered list of vertices
  • Prefaced by v (Wavefront)
  • Spatial coordinates x,y,z
  • Index given by order
  • List of polygons
  • Prefaced by f (Wavefront)
  • Ordered list of vertex indices
  • Length of sides
  • Orientation given by order

(x1,y1,z1)
(x0,y0,z0)
v x0 y0 z0 v x1 y1 z1 v x2 y2 z2 v x3 y3 z3 f 0
1 2 f 1 3 2
9
Other Attributes
v x0 y0 z0 v x1 y1 z1 v x2 y2 z2 vn a0 b0 c0 vn
a1 b1 c1 vn a2 b2 c2 vt u0 v0 vt u1 v1 vt u2 v2
(x2,y2,z2)(a2,b2,c2) (u2,v2)
  • Vertex normals
  • Prefixed w/ vn (Wavefront)
  • Contains x,y,z of normal
  • Not necessarily unit length
  • Not necessarily in vertex order
  • Indexed as with vertices
  • Texture coordinates
  • Prefixed with vt (Wavefront)
  • Not necessarily in vertex order
  • Contains u,v surface parameters
  • Faces
  • Uses / to separate indices
  • Vertex / normal / texture
  • Normal and texture optional
  • Can eliminate normal with //

(x0,y0,z0) (a0,b0,c0) (u0,v0)
(x1,y1,z1)(a1,b1,c1) (u1,v1)
f 0/0/0 1/1/1 2/2/2
f 0/0/0 1/0/1 2/0/2
10
Winged-Edge
  • Edge pointers
  • to two endpoint vertices
  • to two faces that share edge
  • to four edges emanating from its endpoints
  • Faces, vertices contain pointer to one edge
  • Faces outlines by walking edges
  • Mesh information really contained in edge
    datastructure

11
Quad-Edge Operators
e Dest
e Lnext
  • Edge e orientation and direction
  • Orientation is surface normal
  • Direction is from origin vertex (e Org) to
    destination vertex (e Dest)
  • Sym operator toggles direction
  • e Org e Sym Dest
  • Flip operator toggles orientation
  • e Left e Flip Right
  • e Onext next edge (ccw) with same origin
  • e Left e Onext Right
  • e Left e Lnext Left

e Right
e Left
e
e Onext
e Org
Sym
e Sym
e
Flip
e Sym Flip
e Flip
12
Dual Meshes
  • Dual of a mesh exchanges faces and vertices
  • Place new vertices at centroid of faces
  • Edges in dual cross original edges
  • at right angles
  • at midpoints
  • but might not actually cross
  • E.g. Dual of a Delaunay triangulation is a
    Voronoi diagram
  • Voronoi faces denote regions closer to
    corresponding Delaunay vertex than any other
    Delaunay vertex

13
Dual Edge Operator
e
e Dual
  • Dual operator rotates edge 90 degrees clockwise
  • Definition
  • e Dual Dual e
  • e Sym Dual e Dual Sym
  • e Flip Dual e Dual Flip Sym
  • e Lnext Dual e Dual Onext-1
  • Dual mesh is inside out and flips its edges
  • Rot operation avoids flipping
  • e Rot e Flip Dual
  • e Rot Rot e Sym

e Dual
e
e
e Rot
14
Fun w/ Quad Edge
e Lnext
e Dest
  • e Rot4 e
  • e Rot Onext Rot Onext e
  • e Rot2 ? e (but e Sym)
  • e Flip2 e
  • e Flip Onext Flip Onext e
  • e Flip Onextn ? e for any n
  • e Flip Rot Flip Rot e
  • e Flip-1 e Flip
  • e Rot-1 e Rot3 e Flip Rot Flip
  • e Dual e Flip Rot
  • e Onext-1 e Rot Onext Rot e Flip Onext Flip

e Right
e Left
e
e Onext
e Org
e Dual
e
e
e Rot
15
Implementation
  • All we need is
  • Rot
  • Flip
  • Onext
  • Edge reference lte,r,fgt
  • e Rotr Flipf
  • r 0..3
  • f 0..1 (above/below bit)
  • Quarter record er contains
  • Data (geometry)
  • Next ? e Rotr Onext

lte,r,fgt Rot lte, (r12f)4, fgt lte,r,fgt Flip
lte, r, (f1)2gt lte,r,fgt Onext lte(rf)4.Nextgt
Rotf Flipf
lte,r,0gt Onext lter.Nextgt lte,r,1gt Onext
lter1.Nextgt Rot Flip ( lte,r,0gt Rot Onext Rot
Flip) ( lte,r,0gt Onext-1 Flip)
If meshes always orientable lte,rgt Rot
lte,r1gt lte,rgt Onext er.Next lte,rgt Sym
lte,r2gt
Write a Comment
User Comments (0)
About PowerShow.com