Answers to Quiz 1 Qn 1
a)
𝑋2 𝑌2
𝑎2 + 𝑎2 = 𝑠𝑒𝑐2𝛼
𝑋 = sec𝛼cos𝛽 𝑌 = sec𝛼sin𝛽 𝑍 = 𝑏 tan 𝛼
𝛽 ∈ |0, 2𝜋)
𝛼 𝜖 (− 𝜋 , 𝜋 ) 22
Paper 1: 𝑎 = 2, Paper 2: 𝑎 = 3,
𝑏 = 4 𝑏 = 6
b) Any reasonable answer, for example,
𝑋=𝑎𝑠𝑒𝑐𝑠1 𝛼𝑐𝑜𝑠𝑠2𝛽 𝑌 = 𝑎 𝑠𝑒𝑐𝑠1 𝛼 𝑠𝑖𝑛𝑠2𝛽 𝑍 = 𝑏 𝑡𝑎𝑛𝑠1 𝛼
or
𝑋 = 𝑎 𝑐𝑜𝑠−𝑠1𝛼 𝑐𝑜𝑠𝑠2𝛽 𝑌 = 𝑎 𝑐𝑜𝑠−𝑠1𝛼 𝑠𝑖𝑛𝑠2𝛽 𝑍 = 𝑏 𝑡𝑎𝑛𝑠1 𝛼
1
Qn 2
Z
𝑂 = (0,0,0)
H height
W
Width
O
X
tan30𝑜= 𝐻 ⟹𝐻=2=𝑊 2√3
g
c
h
b
a
f
e
Y
d
𝑎 = (1, −1, −√3) 𝑏 = (1, 1, − √3)
𝑖𝑗𝑘
𝑂𝑎 × 𝑂𝑏 = |1 −1 −√3| = (2√3,0,2)
1 1 −√3
The set of inequalities
√3𝑋 + 𝑍 < 0 −√3𝑋 + 𝑍 < 0 √3𝑌 + 𝑍 < 0 −√3𝑌 + 𝑍 < 0 −100 < 𝑍 < −√3
⃑⃑⃑⃑⃑ ⃑⃑⃑⃑⃑
2
Qn 3
𝑀𝑃←𝐶𝑇 =[𝑇(10,10,10)𝑅𝑧(−135𝑜)𝑅𝑥(100𝑜)𝑅𝑧(30𝑜)]−1 = 𝑅𝑧(−30𝑜)𝑅𝑥(−100𝑜)𝑅𝑧(135𝑜)𝑇(−𝑎, −𝑎, −𝑎)
glRotatef ( -30, 0, 0, 1); glRotatef (-100, 1, 0, 0); glRotatef ( 135, 0, 0, 1); glTranslatef (-a, -a, -a);
Paper 1: 𝑎 = 10 Paper 2: 𝑎 = 20
Qn 4
VRP = (0, 30, 30) VPN = (0,30,30) VUP = (0, 1, 0)
𝑍𝑉𝐶 =|VPN|=(0,1⁄√2,1⁄√2)
𝑖𝑗𝑘
VUP × VPN = |0 1 0 | = (1⁄√2 , 0, 0)
0 1⁄√2 1⁄√2 𝑋𝑉𝐶 =|VUP×VPN|=(1,0,0)
𝑖𝑗𝑘
|=(0,1⁄√2,−1⁄√2)
𝑀𝑊𝐶←𝐶𝐶 = (0 1/√2 1⁄√2 30) 0 − 1⁄√2 1⁄√2 30
0001
𝑌 =𝑍 ×𝑋 =|
𝑉𝐶 𝑉𝐶 𝑉𝐶 0 1/√2 1/√2
100
1000
3
1000
(0 1/√2 1⁄√2 30)(1)=( 30 )
00
0 −1⁄√2 1⁄√2 30 −1 30−√2
11 The world coordinates are (0, 30, 30 − √2)
0001
4