Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
algorithms (2)
xL
yV
yS Center of
xS xV Projection,
V
Viewer’s
U Position
N
zV
xwc
ywc
window pixel
viewport
Window definition Viewport definition Window’s content Scan conversion onto the
in projection plane in projection plane inside the viewport raster screen
y x
y y
x x
z z
P
P
Q
Q
x x
Viewing direction
z z
Q -> P’
Q -> P’
P -> Q’ P -> Q’
x x
Test 3): test 3 for P and Q fails, Test 4): test 4 for P and Q fails,
than test 3 for P’ and Q’, draw P’, Q’ Than test 4 for P’ and Q’, draw P’, Q’
Viewing direction
P
P
Q Q
C
E
PT:
ABC
DEF
y
AET: D
e
a: AB, BC
d A
b: AB, EF, BC, DF
c: AB, DE, AC, DF c
d: AB, AC, DE, DF
e: DE, DF C
b E
F
a
7 6
4 3
4 3 2
3 0 1 2 3 7
4 4
0 1
0 1 2 3 4 5 6 7
y
Back to front enumeration and visible
faces
2 3 V Visible
2 3 z y x Back to front order
6 2 3 faces
6 6 7 3
3 6 33
6 2
4 6
6 7 7
3 1
- - - 7,6,5,3,4,2,1,0 B,D,L
4 5 5
6 3 25 1
- - + 6,7,4,2,5,3,0,1 B,D,R
4 5 - + - 5,4,7,1,6,0,3,2 B,U,L
1
4 4 5
x - + + 4,5,6,0,7,1,2,3 B,U,R
4 5 + - - 3,2,1,7,0,6,5,4 F,D,L
+ - + 2,3,0,6,1,7,4,5 F,D,R
+ + - 1,0,3,5,2,4,7,6 F,U,L
+ + + 0,1,2,4,3,5,6,7 F,U,R
z
p11
6 p41
4
3
7
p32
5
p42 p12
1
p22
2 3
R1
1 2
3 4
R2
1 2 3 4
R3
Quadtree, octree
Automatically hierarchy generation
Spatial partitioning
Efficient hierarchy traversal
Optimize the intersection computation
8 8
6
8 23
3
6
246
4
8
15
8
7 7
7
2 1 8
3 4
5 7
1
2 6
8 R3
R2
R1
3 4
5
1 7
Automatically hierarchy generation
Spatial partitioning
Efficient hierarchy traversal
Optimize the intersection computation
5
3
5a back
5b front
2
3 1 4
6 2 5b
7
5a 7
6
1 4
5
2
3
5a back
2a 5b front
2b
6 4
3
6 5b
7 front back 7
1 4
2b 1
front back
5a 2a
5
2 3
5a back
2a 5b front
2b
3 6 7
6 front back
7 front back
1 4
2b 1 5b 4
front back
5a 2a
Display order:
Viewer 1. Front space polygons
2. Root face
F 3. Back space polygons
Front Space
Back Space
4
5
2 3
5a back
2a 5b front
2b 2
7
3 6 7
Viewer 6 front
7 front back back
6 8 3 1
1 4
2b 1 5b 4
front back
5 9
5a 2a