Game Development Reference
In-Depth Information
pixPhys
x
pixPhys
y
=
devPhys
x
devPhys
y
devRes
y
devRes
x
=
16
480
640
=
4
(b)
(width greater than height)
9
3
winPhys
x
winPhys
y
=
winRes
x
winRes
y
pixPhys
x
pixPhys
y
=
320
480
1 =
2
3
2.
(a)
(width less than height)
(b) Using the left side of Equation (10.3), we have
1
tan (fov
x
/2)
=
1
tan (60
o
/2)
zoom
x
=
≈ 1.732.
(c) Using Equation (10.4),
zoom
y
zoom
x
=
winPhys
x
winPhys
y
,
zoom
y
1.732
=
2
3
,
zoom
y
= 1.155.
(d) Using the right side of Equation (10.3), we have
fov
y
= 2 arctan (1/zoom
y
) = 2 arctan (1/1.155) = 81.77
o
.
(e) The correct formula is given by Equation (10.3.4).
2
4
3
5
=
2
4
3
5
zoom
x
0
0
0
1.732
0
0
0
0
zoom
y
0
0
0
1.155
0
0
−
f+n
f−n
−2nf
f−n
−
256.0+1.0
256.0−1.0
−2(1.0)(256.0)
256.0−1.0
0
0
0
0
0
0
−1
0
0
0
−1
0
2
4
3
5
1.732
0
0
0
0
1.155
0
0
=
0
0
−1.00784
−2.00784
0
0
−1
0
(f) This time we use Equation (10.7).
2
4
3
5
=
2
4
3
5
=
2
4
3
5
zoom
x
0
0
0
1.732
0
0
0
1.732
0
0
0
0
zoom
y
0
0
0
1.155
0
0
0
1.155
0
0
f
f−n
0
0
256
256−1
1
0
0
1
0
0
1.00392
1
−(1)(256)
256−1
−nf
f−n
0
0
−1.00392
0
0
0
0
0
0
0
winPhys
x
winPhys
y
=
winRes
x
winRes
y
pixPhys
x
pixPhys
y
=
320
480
4
3
=
8
3.
(a)
9
(b) Same as before, 1.732.
zoom
y
zoom
x
=
winPhys
x
(c)
winPhys
y
zoom
y
1.732
=
8
9
,
zoom
y
= 1.540
(d) fov
y
= 2 arctan (1/zoom
y
) = 2 arctan (1/1.540) = 66.00
o
4. (a) 2
(b) 1
(c) 4
(d) 6
(e) 3
(f) 5
Search WWH ::
Custom Search