Angle/rotation matrix (basics)

Homework 4. Chapter 5.
Vector bases and rotation matrices I
Show work – except for ♣ fill-in-blanks-problems.
4.1 ♣ SohCahToa: Sine, cosine, tangent as ratios of sides of a right triangle.
The following shows a right triangle with one of its angles labeled as θ.
Write definitions for sine, cosine, and tangent in terms of:
• h ypotenuse – the triangle’s longest side (opposite the 90◦ angle).
sin(θ) • o pposite – the side opposite to θ
• a djacent – the side adjacent to θ
se
θ
Note: A right triangle is a
triangle with a 90◦ angle.
cos(θ) opposite
u
ten
o
p
hy
Note: A mnemonic for these
definitions is “SohCahToa”.
(Section 1.5)
tan(θ) sin(θ)
cos(θ)
=
adjacent
4.2 ♣ Pythagorean theorem and law of cosines - memorize.
(Section 1.5.1).
Draw a right-triangle with a hypotenuse of length c and other sides of
length a and b. Relate c to a and b with the Pythagorean theorem.
Result:
c2 =
A non-right-triangle has angles α, β, φ opposite sides a, b, c, respectively.
Use the law of cosines to complete each formula below.
Result:
c2 = a2 + b2 − 2 a b cos(φ)
b
2
a =
a
b =
The Pythagorean theorem is a special case of the law of cosines.
4.3 ♣ Memorize common sines and cosine.
cos(0◦ ) =
sin(30◦ ) =
cos(30◦ ) =
◦
( 0, 1 )
(Section 1.5)
cos(45 ) =
sin(60◦ ) =
cos(60◦ ) =
◦
(
,
)
,
(
( ,
)
)
)
( 1, 0 )
(0, 0)
( ,
,
)
Label the coordinates of each point on the unit circle.
◦
sin(90 ) =
True/False . (circle one).
(
◦
sin(45 ) =
φ
β
2
sin(0◦ ) =
α
c
cos(90 ) =
4.4 ♣ Graphing sine and cosine - (a now-obvious invention from 1730 A.D.) (Section 1.5.2)
Graph sine and cosine as functions of the angle θ in radians over the range 0 ≤ θ ≤ 2 π.
The mathematician
was first to regard sine and cosine as functions (not just ratios of sides of a triangle).
Result:
sin(θ) vs. θ
cos(θ) vs. θ
1
1
0.5
0.5
0
π/4
π/2
3π/4
π
5π/4
3π/2
−0.5
7π/4
2π
0
θ
−0.5
−1
c 1992-2017 Paul Mitiguy. All rights reserved.
Copyright π/4
π/2
3π/4
π
5π/4
3π/2
7π/4
2π
θ
−1
39
Homework 4: Rotation matrices I
4.5 ♣ Ranges for arguments and return values for inverse trigonometric functions.
Determine all real return values and argument values for the following real trigonometric and inverseR
.
trigonometric functions in computer languages such as Java, C++ , MotionGenesis, and MATLAB
Possible return values
≤z≤
≤z≤
−∞
<z< ∞
≤z≤
≤z≤
z
z
z
z
Function
= cos(x)
= sin(x)
= tan(x)
= acos(x)
Possible argument values
<x<
<x<
−∞
<x<
∞
≤x≤
π/2 < z < π/2
≤z≤
∞
z = atan(x)
z = atan2(y, x)
4.6 ♣ What is an angle?
x =
−π
2
,
π
2
,
3π
2
, ...
≤x≤
z = asin(x)
−
Note
−
<x<
<y<
<x<
∞
atan2(0, 0) is undefined
(Section 5.6).
Draw the “geometry equipment” listed in the 1st column of the following table.
Complete the 2nd column with appropriate ranges for the angle θ (in degrees).
“Geometry equipment”
Draw
Appropriate range for θ
0◦
2 lines
≤ θ ≤
Vector and line
≤ θ ≤
2 vectors
≤ θ ≤
2 vectors and a sense of positive rotation
< θ ≤
Not
applicable
2 vectors, a sense of ± rotation, and time-history/continuity
< θ <
4.7 Calculating dot-products, cross-products, and angles between vectors.
az
aRb
x
y
z
b
b
b
The aRb rotation table relates
ay
two sets of right-handed, or
ax 0.9623 −0.0842 0.2588
ax
thogonal, unit vectors, namely
y 0.1701 0.9284 −0.3304
a
x, b
y , b
z .
ay , az and b
ax , az −0.2125 0.3619 0.9077
(Section 5.4.3).
bz
by
bx
(a) Efficiently determine the following dot-products and angles between vectors (2+ significant digits).
x .
x and v2 = ax + b
Then perform the following calculations involving v1 = 2 a
x =
ax · a
x =
ax · b
∠ ay , ay =
y =
∠ ay , b
Result:
◦
◦
z =
ay · a
y =
ax · b
z , b
x =
∠ b
y , ∠ b
az =
v1 · v2 =
v1 × v2 =
y +
b
y =
z · b
b
z · a
y =
b
◦
◦
∠ v1 , v2 =
z =
b
◦
ay +
az
z in terms of z.
in the direction of 3 a
z + 4 b
(b) Express the unit vector u
az and b
ax , ay , az .
Express v = ay + by in terms of z
Result:
=
az +
b
u
v =
c 1992-2017 Paul Mitiguy. All rights reserved.
Copyright ax +
40
ay +
az
Homework 4: Rotation matrices I
4.8 ♣ Efficient calculation of the inverse of a rotation matrix.
(Section 5.4.2).
The following rotation matrix R relates two right-handed, orthogonal, unitary bases.
Calculate its inverse by-hand (no calculator) in less than 30 seconds.



0.3830 −0.6634 0.6428
⇒
R −1 = 
R =  0.9237 0.2795 −0.2620 
−0.0058
0.6941 0.7198


4.9 SohCahToa: Rotation tables for a landing gear system. (Section 5.5).
The figures below show three versions of the same landing gear system with a strut A that has a
simple rotation relative to a fuselage N . Each figure has a different orientation for right-handed
y , n
y , n
z (fixed in N ) and z and
x , n
ax , ay , az (fixed in A). Redraw n
orthogonal unit vectors n
ay , az so it is easy to see sines and cosines. Then, form the aRn rotation table for each figure.1
ax , nz
N
ny
A
az
ay
aRn
x
n
ax
1
ay
0
az
0
aRn
x
n
y
n
z
n
cos(θ)
sin(θ)
sin(θ)
cos(θ)
y
n
z
n
−
θ
ny
N
nx
A
x
a
ay
ay
z
a
ax
θ
nx
N
ny
aRn
A
x
n
y
n
z
n
ax
ax
ay
az
ay
θ
x and Each figure has two missing vectors (e.g., n
ax are missing from the first figure). Use the fact that each set of vectors
is right-handed to add the missing vectors to each figure.
1
c 1992-2017 Paul Mitiguy. All rights reserved.
Copyright 41
Homework 4: Rotation matrices I