Chapter 5

advertisement
yv
xv
zv
1
0
Pz  
0

0
0
1
0
0
0
0
0
0
0
0 
0

1
yv
xv
zv
0
0
Px  
0

0
0
1
0
0
0
0
1
0
0
0 
0

1
1
0
Py  
0

0
yv
xv
zv
0
0
0
0
0
0
1
0
0
0
0

1
0
0
Ex.กำหนดให้วตั ถุมีจุดยอดเป็ น X  2
จงหำด้ำน Front และ side view 1
2 2 0 2 2 2 2 0 0 0 0
0 1 1 0 2 2 1 1 2 2 0 
2 2 2 0 0 1111 0 0

11 1 11 1111 11 
yv
7
11
10
6
9
7
12
4
8
3
5
xv
1
zv
2
12
0
0
X 
2

1
2 2 0 2 2 2 2 0 0 0 0
0 1 1 0 2 2 1 1 2 2 0 
2 2 2 0 0 1111 0 0

11 1 11 1111 11 
1
0
Pz  
0

0
X '  Pz X
1
0

0

0
0 0 0  0
1 0 0  0
0 0 0  2

0 0 1 1
0 2
0 0

0 0

1 1
2 2 0 2 2 2 2 0 0 0 0
0 1 1 0 2 2 1 1 2 2 0 
2 2 2 0 0 1111 0 0

11 1 11 1111 11 
2 2 2 2 0 0 0 0
0 2 2 1 1 2 2 0 
0 0 0 0 0 0 0 0 0 0

1 1 1 1 1 1 1 1 1 1 
2 0
1 1
0
1
0
0
0 0
0 0 
0 0

0 1
0
0
X ' 
0

1
yv
2
0
0
1
2
1
0
1
0 2
1 0
0 0
1 1
2
2
0
1
2 0 0 0 0
1 1 2 2 0 
0 0 0 0 0

1 1 1 1 1
7
12
2
2
0
1
10 11
67
4 9
38
1 12
25
xv
Only one face of an object
zv


These two planes are called the nearfar clipping planes, or the front-back
clipping planes.
The near and far planes allow us to
exclude objects that are in front of or
behind the part of the scene that we
want to display.
The orthogonal-projection view volume
Axonometric Orthogonal Projection



We can also form orthogonal projections
that display more than one face of an object.
Such views are called axonometric
orthogonal projections.
The most commonly used axonometric
projection is the isometric projection, which
is generated by aligning the projection plane
(or the object) so that the plane intersects
each coordinate axis in which the object is
defined, called the principal axes.
Isometric Projection
y
y
x
z
z
x
Isometric Projection



1) Rotation about the y-axis
2) Rotation about the x-axis
3) An orthogonal projection to the z=0
plane
M TILT
0  cos y 0 sin  y 0 



0 cos x - sin  x 0  0
1
0
0
0 sin  x cos x 0  sin  y 0 cos y 0


0
0
0
1   0
0
0
1 
0
sin  y
0 
 cos y


sin  y sin x cosθ x - sin  x cos y 0


 sin  y cos x sin  y cos y cos x 0 


 0
0
0
1 

2) 1) 
 [TR ]x [TR ]y  



1
0
0
3)Pz
M ISO






1
0
0
0
1
0
0
0
0
0
0
0






1
0
0
0
1
0
0
0
0
0
0
0
0
0 
M TILT
0

1
0
sin  y
0   cos y


0   sin  y sin x cosθ x - sin  x cos y
0  sin  y cos x sin  y cos y cos x

1   0
0
0
0
sin  y
0
cos y


sin  y sin x cos x - sin x cos y 0


 0
0
0
0


0
0
1 
 0
0

0
0

1 
0
0
X 
2

1
Ex.กำหนดให้วตั ถุมีจุดยอดเป็ น
จงหำ isometric projection
2 2 0 2 2 2 2 0 0 0 0
0 1 1 0 2 2 1 1 2 2 0 
2 2 2 0 0 1111 0 0

11 1 11 1111 11 
7
12
yv
 y  45
11
10
6
9
 x  35.26
7
12
4
8
3
5
xv
1
zv
2
cos y

sin  y sin x
P*  
 0

 0
sin  y
0  0

cos x - sin x cos y 0 0
0  2
0
0

1  1
0
0
0
2 2 0 2 2 2 2 0 0 0 0
0 1 1 0 2 2 1 1 2 2 0 
2 2 2 0 0 1111 0 0

11 1 11 1111 11 
0 0.707 0  0 2 2 0 2 2 2 2 0 0 0 0
0.707
0.408 0.816 - 0.408 0 0 0 1 1 0 2 2 1 1 2 2 0 



 0
0 0  2 2 2 2 0 0 1 1 1 1 0 0 
0



1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0



 1.414 2.8280 2.8280 1.4140 1.4140 1.4140 2.1210 2.1220 0.7070 0.7070 0.0 0.0

- 0.816 0.0
0.0
1.6320
1.2240
0.4080
1.2240
2.0400
2.4480
0.8160
0.0
0.8160


 0.0 0.0
0.0 0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0


1.0
1
1
1
1
1
1
1
1
1
1
1


yv
6
7
11
10
8
5
9
3
12
4
2
xv
1
zv
7-7 Oblique Parallel
Projections


In general, a parallel-projection view of a
scene is obtained by transferring object
descriptions to the view plane along
projection paths that can be in any selected
direction relative to the view-plane normal
vector.
When the projection path is not
perpendicular to the view plane, this
mapping is called an oblique parallel
projection.
Cavalier projection of the unit cube onto the z=0 plane
Cabinet Projection
[Foley et al.]
P’
L
P
S
R


1) Shearing of the object in space in a
direction parallel to the plane of
projection
2) Orthogonal projection onto the
plane of projection
1) Shearing
2) Projection Pz
M OB
0
 1
 0
1


 0
0

0
 0
0
1
0
1


0
0

0
0
0 
0
0  
0
0 

0
1 
Lcos 0 
L sin  0
0
0

0
1
0
1
0
Lcos
0
1
L sin 
0
0
1
0
0
0
0
0
0

1
Ex วัตถุ P(3,4,0), Q(1,0,4), R(2,0,5) และ S(4,0,3)
โปรเจ็คชันแบบ Oblique (Cavalier) ลงบนระนำบ
Z=0 โดยมุมแอลฟำ = 45 องศำ, L=1
yv
P
Q
R
zv
S
3 1 2 4 
 4 0 0 0

X 
0 4 5 3 


1 1 1 1 
xv
 1
 0
X ' 
 0

 0
1
0

0

0
1
0

0

0
3
4

0

1
0
1
0
0
0
1
0
0
0  1
0
0   0
1
0  0
0

1  0
0
Lcos 0  3 1 2 4 
L sin  0 4 0 0 0
0
0  0 4 5 3 


0
1  1 1 1 1 
0
0
0
0
0 0.707 0  3 1 2 4 
1 0.707 0  4 0 0 0
0
0
0  0 4 5 3 


0
0
1 1 1 1 1 
3.83 5.54 6.12
2.82 3.54 2.12
0
0
0 

1
1
1 
Lcos
L sin 
1
0
0  3 1 2 4 
0 4 0 0 0
0  0 4 5 3 


1  1 1 1 1 
7-8 Perspective Projections

We can approximate this geometricoptics effect by projecting objects to
the view plane along converging paths
to a position called the projection
reference point (or center of
projection).
Perspective projection
y
z-axis vanishing point
z
x
One-Point Perspective
Projection
[Foley et al.]
fig 6.3 One-point perspective projections of a cube onto a plane cutting the
z axis showing vanishing point of lines perpendicular to projection plane
2-Point Perspective
Projections



1) Rotate object with an angle about yaxis
2) Translate object by [0 m n]
3) Perform 1-point perspective
projection onto the xy-plane (z=0)

Rotate object with an angle about y-axis
cos y 0 sin  y 0 


0
1
0
0



[TR ] y 
 sin  y 0 cos y 0


0
0
1 
 0

Translate object by [0 m n]
[TTR ]( 0,m ,n )
1
0

0

0
0
1
0
0
0
0
1
0
0

m
n

1

1-Point Perspective projection onto Z=0
1
0

[ M PERS ]  0

0

0

1
0 0
0
0 0

1
0 1
Zcp 
0
0
Ex. ลูกบำศก์ถูกกระทำแบบ 2-point perspective
projection โดยกำรหมุนรอบแกน y ไปเป็ นมุม 30
องศำ แล้วเลื่อนไปด้วยระยะ (0,3,-3) และ center of
projectiony คือ (0,0,2)
Zcp
4
5
8
1
6
z
x
3
7
2
0
0
X 
0

1
1
0
0
1
1
1
0
1
0
1
0
1
0
1
1
1
0
0
1
1
1
0
1
1
1
1
1

1
0 0.315 0.315 0 2.242 2.242 0.59 0.59
1.2 1.1 1.455 1.6 1.935 1.451 1.295 1.727

X ' 
0
0 
0
0
0
0
0
0


1
1
1
1
1
1
1
1


y
x
z
3-Point Perspective
Projections




1) Rotate object with an angle about yaxis
2) Rotate object with an angle about xaxis
3) Translate object by [0 m n]
4) Perform 1-point perspective
projection onto the xy-plane (z=0)
Download