Representing Solids Boundary Representation (B-Rep) : Slide 1 Slide 2
Representing Solids Boundary Representation (B-Rep) : Slide 1 Slide 2
Describes an object in terms of its surface boundaries: vertices, edges, faces. Most common representation in computer graphics. Suitable for planar, polygonal boundaries. De ning faces for curved objects is tricky. Most b-reps support only solids whose boundaries are 2-manifolds.
Boundary representation Spatial decomposition Constructive solid geometry Boolean operations on solids
(a)
(b)
(c)
Slide 1
CPS124, 296: Computer Graphics
Solid Modeling
Slide 2
Page 1
Polyhedra
Nonsimple Polyhedra
Euler formula generalizes to non-simple polyhedra with 2-manifold boundaries. V E + F H = 2(C G).
Bounded by a set of polygons, each edge adjacent to even number of faces. Adjacent to exactly two faces for 2manifolds.
Simple polyhedron: Can be deformed to a ball; no holes. Examples: Cube, tetrahedron, prism, pyramid. Torus is not a simple polyhedron.
V=8 E = 12 F=6 V=5 E=8 F=5 V=6 E = 12 F=8
C : # connected components
Euler's formula
V E + F H = 2(C G) 24 36 15 3 1 1
Slide 3
CPS124, 296: Computer Graphics
Solid Modeling
Slide 4
Page 2
Boolean Operations
Complex objects are de ned as Boolean formula of simple objects
C
V1 E1 V2
F2 E5
C-C
Each edge e stores Two faces f1 ; f2 adjacent to e Two endpoints v1; v2 of e Two edges incident to v1 immediately before and after e in clockwise direction Two edges incident to v2 immediately before and after e in clockwise direction Each vertex v stores pointer to one of the edges incident to v Each face f stores pointer to one of the edges bounding f
Union(A,B)
Intersection(A,B)
The resulting object may some dangling vertices, edges, and faces.
Slide 5
CPS124, 296: Computer Graphics
Solid Modeling
Slide 6
Page 3
Spatial Decomposition
Divide the space into primitive cells. Represent all cells lying in the object. Divide the space into identical cells arranged in a xed regular grid structures. 3D Analog of 2D images. Cells are often cubes and are called voxels. Popular representation in volume rendering and CAT. High storage requirement.
Solid
Plane
Line
Point
Empty Set
Slide 7
CPS124, 296: Computer Graphics
Solid Modeling
Slide 8
Page 4
Oct Trees
Quad Trees
Hierarchical representation. Requires much less space. Extension of 2D quad tree. Recursively subdivide the plane into four squares by bisecting it in both directions. A square is full, empty, partially full. A partiually full square is further subdivided. Parttioning continues until a cuto threshold is reached.
Can be reprsented as a 4-way tree. Each node v represents a square Qv If Qv P , v is black. If Qv \ P = ;, v is white. Otherwise v is gray. Gray nodes are further subdivided.
2 0 3 1 Quadrant Numbering
Quad tree:
P 3
E F
F F
F F E E
F E F E
F E F F
F E F E
F E F F
F F F E
Slide 9
CPS124, 296: Computer Graphics
Solid Modeling
Slide 10
Page 5
Oct Trees
Oct tree is a similar to quadtrees. Each cube is divided into eight octants. Useful for many operations, e.g., collision detection, ray tracing.
y
P E P P F F E P
P P
E E F E
2 2 6 6 6 4 4 5 5 6 7 7 7 5 5 3 3 3 1 1 x 3
E F E E
F E F F
E E F F
Object S
Object T
Space requirement is still large. item Sensitive to the position of the object. Only approximate representation for nonorthogonal objects.
P F P F F
P E E E P
E E F E
E E F F
Union (S, T)
Intersection (S,T)
Slide 11
CPS124, 296: Computer Graphics
Solid Modeling
Slide 12
Page 6
Simple primitives are combined using regularized Boolean operations Object is stored as a tree with operators at interior nodes Edges of the tree are ordered Spatial decomposition a special case of CSG
Each interior node v is associated with a plane v (containing a face of P ) and convex polytope Qv . + v : outside halfspace bounded by v . v : inside halfspace bounded by v . The left child w of v is associated with Qv \ . If Qw is monochromatic, w is a leaf. The right child x of v is associated with Qv \ +. If Qz is monochromatic, w is a leaf.
U*
Slide 13
CPS124, 296: Computer Graphics
Solid Modeling
Slide 14
Page 7
Slide 15
CPS124, 296: Computer Graphics
Solid Modeling
Page 8