Constructive Solid Geometry
Constructive Solid Geometry
CSG
You can do a lot of things with simple
primitives (e.g., cube, sphere, cylinder, etc.)
The power is in the operations that can be
performed on them
Computer Graphics
Wireframe Model
The simplest way of representing solids
Data structures:
A
vertex table
An edge table
A face table (optional): faces are not displayed
Fast
Ambiguity (is a face there or not)
Computer Graphics
Example
1, 2, 3, 4, 5, 6, 7, 8
1
2 a
c
3
b
e
5
i
4
a, b, c, d, e, f, g, h, i, j, k, l
h
g
l
k 8
A, B, C, D, E, F
Computer Graphics
True Solids
A few primitives
Cube,
sphere, cylinder
A few operations
Singleton
Translate,
rotate, scale
Binary
Union
Computer Graphics
Examples
Computer Graphics
Example
A B
A B
A B B A
Computer Graphics
Example
Difference
Union
Union
Union
T,R,S
T,R,S
T,R,S
T,R,S
T,R,S
T,R,S
Computer Graphics
Trans(sphere)
)
Computer Graphics
Procedures
each object
Use
Computer Graphics
Bounding Volume
Slab : aX + bY + cZ + d = 0
X = X o + tX
ray : Y = Yo + tY
Z = Z + tZ
o
aX + bYo + cZ o + d A + D
t= o
=
aX + bY + cZ
B
D: per slab
Computer Graphics
All the maximum (circle) intersections must be after all the minimum
(square) intersections
Computer Graphics
Spatial Partitioning
Computer Graphics
Packages
Computer Graphics