Game Development Reference
In-Depth Information
2
4
3
5
2
4
3
5
2
4
−9
3
5
6
1
−2
−1
17
53970
206756
89938
206756
62848
206756
=
+
+
8
0
2
4
3
5
2
4
3
5
2
4
−9
3
5
6
1
−2
−1
17
= 0.261
+ 0.435
+ 0.304
8
0
2
4
3
5
2
4
3
5
2
4
−2.736
3
5
2
4
3
5
1.566
2.610
−0.522
1.305
−0.435
7.395
0.135
4.607
6.873
2.432
0
=
+
+
=
5. Using Equation (9.13):
n
x
=(12.70 + (−9.22))(13.90−12.77) + (−9.22 + 12.67)(12.77−2.34)
+ (12.67 + (−7.09))(2.34−10.64) + (−7.09 + 18.68)(10.64−3.16)
+ (18.68 + 12.70)(3.16−13.90) = −256.73
n
y
=(−29.74 + 11.53)(12.70−(−9.22)) + (11.53 + 9.16)(−9.22−12.67)
+ (9.16 + 14.62)(12.67−(−7.09)) + (14.62 + (−3.31))(−7.09−18.68)
+ (−3.31 + (−29.74))(18.68−12.70) = −871.27
n
z
=(13.90 + 12.77)(−29.74−11.53) + (12.77 + 2.34)(11.53−9.16)
+ (2.34 + 10.64)(9.16−14.62) + (10.64 + 3.16)(14.62−(−3.31))
+ (3.16 + 13.90)(−3.31−(−29.74)) = −437.40
Normalizing this result, we have
n = [−0.255,−0.864,−0.434].
Now the best-fit d value is computed by
d = n(p
1
+ p
2
+ p
3
+ p
4
+ p
5
)/5
= [−0.255,−0.864,−0.434][2.26, 42.81, 27.74]/5 = −9.92.
6. The seven-sided polygon is fanned into five triangles. One possible way to fan the polygon,
based on the simple strategy given in Section 9.7.3, is
{v
1
, v
2
, v
3
},{v
1
, v
3
, v
4
},{v
1
, v
4
, v
5
},{v
1
, v
5
, v
6
},{v
1
, v
6
, v
7
}.
B.10
Chapter 10
(Page 476.)
1. This is a straightforward application of Equation (10.2).
pixPhys
x
pixPhys
y
=
devPhys
x
devPhys
y
devRes
y
devRes
x
=
4
480
(a)
640
= 1
3
Search WWH ::
Custom Search