1
Solid Modeling
Adam FinkelsteinPrinceton University
COS 426, Spring 2003
3D Object Representations• Raw data
o Point cloudo Range imageo Polygon soup
• Surfaceso Mesho Subdivision o Parametrico Implicit
• Solidso Voxelso BSP treeo CSGo Sweep
• High-level structureso Scene grapho Skeletono Application specific
3D Object Representations• Raw data
o Point cloudo Range imageo Polygon soup
• Surfaceso Mesho Subdivision o Parametrico Implicit
• Solidso Voxelso BSP treeo CSGo Sweep
• High-level structureso Scene grapho Skeletono Application specific
Implicit Surfaces• Points satisfying: F(x,y,z) = 0
Polygonal Model Implicit Model
Bill LorensenSIGGRAPH 99Course #4 Notes
Implicit Surfaces• Example: quadric
o f(x,y,z)=ax2+by2+cz2+2dxy+2eyz+2fxz+2gx+2hy+2jz +k
• Common quadric surfaces:o Sphereo Ellipsoido Toruso Paraboloido Hyperboloid
H&B Figure 10.10
01222
=−
+
+
zyx rz
ry
rx
Implicit Surfaces• Advantages:
o Very conciseo Guaranteed validityo Easy to test if point is on surfaceo Easy to intersect two surfaces
• Disadvantages:o Hard to describe complex shapeso Hard to enumerate points on surfaceo Hard to draw
2
3D Object Representations• Raw data
o Point cloudo Range imageo Polygon soup
• Surfaceso Mesho Subdivision o Parametrico Implicit
• Solidso Voxelso BSP treeo CSGo Sweep
• High-level structureso Scene grapho Skeletono Application specific
Solid Modeling• Represent solid interiors of objects
o Surface may not be described explicitly
Visible Human(National Library of Medicine)
SUNY Stoney Brook
Motivation 1• Some acquisition methods generate solids
o Example: CAT scan
Stanford University
Motivation 2• Some applications require solids
o Example: CAD/CAM
Intergraph Corporation
Motivation 3• Some algorithms require solids
o Example: ray tracing with refraction
Addy Ngan and Zaijin GuanCOS 426, 1998
Princeton University
Solid Modeling Representations• What makes a good solid representation?
o Accurateo Conciseo Affine invarianto Easy acquisitiono Guaranteed validityo Efficient boolean operationso Efficient display
Lorensen
3
Solid Modeling Representations• Voxels
• Quadtrees & Octrees
• Binary space partitions
• Constructive solid geometry
Solid Modeling Representations• Voxels
• Quadtrees & Octrees
• Binary space partitions
• Constructive solid geometry
Voxels• Partition space into uniform grid
o Grid cells are called a voxels (like pixels)
• Store properties of solid object with each voxelo Occupancyo Coloro Densityo Temperatureo etc.
FvDFH Figure 12.20
Voxel Acquisition• Scanning devices
o MRIo CAT
• Simulationo FEM
SUNY Stoney Brook
Stanford University
Voxel Storage• O(n3) storage for nxnxn grid
o 1 billion voxels for 1000x1000x1000
Voxel Boolean Operations• Compare objects voxel by voxel
o Trivial
∪ =
∩ =
4
Voxel Display• Isosurface rendering
o Render surfaces bounding volumetric regions of constant value (e.g., density)
Isosurface VisualizationPrinceton University
Voxel Display• Slicing
o Draw 2D image resulting from intersecting voxels with a plane
Visible Human(National Library of Medicine)
Voxel Display• Ray casting
o Integrate density along rays through pixels
Engine BlockStanford University
Voxels• Advantages
o Simple, intuitive, unambiguouso Same complexity for all objects o Natural acquisition for some applicationso Trivial boolean operations
• Disadvantageso Approximateo Not affine invarianto Large storage requirementso Expensive display
Solid Modeling Representations• Voxels
• Quadtrees & Octrees
• Binary space partitions
• Constructive solid geometry
Quadtrees & Octrees• Refine resolution of voxels hierarchically
o More concise and efficient for non-uniform objects
Uniform Voxels Quadtree
FvDFH Figure 12.21
5
Quadtree Boolean Operations
A B
A ∩ BA ∪ B
FvDFH Figure 12.24
Quadtree Display• Extend voxel methods
o Slicing o Isosurface extractiono Ray casting
Finding neighbor cell requirestraversal of hierarchy (O(1))
FvDFH Figure 12.25
Solid Modeling Representations• Voxels
• Quadtrees & Octrees
• Binary space partitions
• Constructive solid geometry
Binary Space Partitions (BSPs)• Recursive partition of space by planes
o Mark leaf cells as inside or outside object
a
b
c
de
f
1
2
3
7
4
5
6
a
b c
def
g
Object
a
b
cdef
1
2
3
4
5
6
7
Binary Spatial Partition
Binary Tree
Naylor
BSP FundamentalsSingle geometric operation
Partition a convex region by a hyperplaneSingle combinatorial operation
Two child nodes added as leaf nodes
R-
R+
Initial Tree
Homogeneous region
Partitioned region
R
New treeR
⇒
⇒
h
R+R-
R- +
Naylor
BSP is a Search StructureExploit hierarchy of convex regions
Regions decrease in size along any tree pathRegions converge in the limit to the surface
IN
OUTOUT
OUT
on on
on
1st level Approximation
IN
OUTOUT
OUT
out
out
outinin
in
2nd level Approximation
on
on
on on
on
on
Naylor
6
BSP Acquisition• Must construct a “good” binary search structure
o Efficiency comes from logarithmic tree depth
IN
OUTOUT
OUT
out
out
outinin
in
“Bad” “Good”
Naylor
BSP Boolean Operations• Divide and conquer
o Each node V corresponds to a convex region containing all geometry in the subtree rooted at V
o No intersection with bounding volume of V means no intersection with subtree rooted at V
o Do detail work only in regions requiredo Boolean operations grow with O( log n) if “good” tree
Naylor
BSP Display• Visibility ordering
o Determine on which side of plane the viewer lies» near-subtree -> polygons on split -> far-subtree
A
B
Co1
o2
o3
o4
Viewer
o3o2o1 o4
Viewer
3rd 4th 1st 2nd
Partitioning Tree
CB
A
Naylor
Solid Modeling Representations• Voxels
• Quadtrees & Octrees
• Binary space partitions
• Constructive solid geometry
Constructive Solid Geometry (CSG)• Represent solid object as hierarchy of
boolean operationso Uniono Intersectiono Difference
FvDFH Figure 12.27
CSG Acquisition• Interactive modeling programs
o CAD/CAM
H&B Figure 9.9
7
CSG Boolean Operations• Create a new CSG node joining subtrees
o Uniono Intersectiono Difference
FvDFH Figure 12.27
CSG Display & Analysis• Ray casting
Circle Box
Union
Summary
Accurate No No Some SomeConcise No No No YesAffine invariant No No Yes YesEasy acquisition Some Some No SomeGuaranteed validity Yes Yes Yes NoEfficient boolean operations Yes Yes Yes YesEfficient display No No Yes No
Vox
els
Oct
ree
BSP
CSG
Taxonomy of 3D Representations
Discrete Continuous
Combinatorial Functional
Parametric ImplicitTopological Set Membership
Voxels
MeshSubdivision
BSP TreeCell Complex
BezierB-Spline
Algebraic
Naylor