Rotation About An Arbitrary Axis (Line)
Rotation About An Arbitrary Axis (Line)
Rotation About An Arbitrary Axis (Line)
R
Rotation
i about
b
an A
Arbitrary
bi
A
Axis
i (Li
(Line))
Z
P1
P1
P2
Z0
P0
X0
Y0
P0
x = Au + x0
y = Bu + y0
0 < =u <=1
z = Cu + z0
L = A2 + B 2 + C 2 u
B
A
AB
P0 = [ xo yo zo ]T
0 0 x0
1 0 y0
0 1 z0
0 0
1
1
0
[D] =
0
P1(A,B,C)
A
P0
B
xx
Step
p 2: Rotate Vector about X Axis to g
get into the x - z p
plane
L = A2 + B 2 + C 2
V = B2 + C 2
B
sin 1 =
V
C
cos1 =
V
0
1
0 cos
1
[Rx ] =
0 sin 1
0
0
0
sin 1
cos1
0
1 0
0 C
0
0 V
=
0 0 B
1 V
0 0
0
B
V
C
V
0
Step
p 3: Rotate about the Y axis to g
get it in the Z direction
Rotate a negative angle (CW)!
A
sin 2 =
L
V
cos 2 =
L
cos 2
0
Ry =
sin 2
0 sin 2
1
0
0 cos 2
0
V
0 L
0 0
=
0
A
1 L
0
0
1
0
0
L
0
V
L
0
v
Step 4: Rotate angle about axis
L
cos
sin
[Rz ] =
0
sin
cos
0
0
0 0
0 0
1 0
0 1
L
0
[ ]
A
L
1 0
V
0
L
0 0
0
0
0
cox 2
0
Ry =
sin 2
[ ]
0 sin 2
1
0
0 cos 2
0
0
Inverse of Rotation:
Replace
by
sin
by
sin
V
0
L
0 0
=
0 A
1 L
0
A
L
0
V
L
0
0
1
0
0
0
0
St 6:
Step
6 Reverse
R
rotation
t ti about
b t the
th X axis
i
1 0
C
0
1
R
[ x ] = VB
0
V
0 0
0
1
0 cos
1
[Rx ] =
0 sin 1
0
0
0
sin
i 1
cos1
0
0
B
V
C
V
0
1 0
0 C
0
0 V
=
0 0 B
1 V
0 0
0
B
V
C
V
0
[ D ]1
1 0
0 1
=
0 0
0 0
0 x0
0 y0
1 z0
0 1
Overall Transformation
[T ] = [ D] [ Rx ] [ Ry ] [ Rz ][ Ry ][ Rx ][ D]
P2 = [T ]P1
An Example
CCW
original
60
120
180
p1 p2 p3 p4
An Example
P1 =
Given the point matrix (four
points) on the right; and a line,
NM, with p
point N at ((6, -2, 0))
and point M at (12, 8, 0).
3 10 1 3
5 6 1 5
0 0 0 0
1 1 1 1
A = 12 6 = 6
y = 2 + 10u
z=0
Thus
A = 6, B = 10, C = 0
B = 8 (2)) = 10
L = A2 + B 2 + C 2 = 11.6619
C = 0 0 = 0
V = B 2 + C 2 = 10
[D] = 1 0 0 -6
010 2
001 0
000 1
[R]x = 1 0 0 0
0 C/V -B/V 0
0 B/V C/V 0
0 0
0 1
[R]y = V/L
0
A/L
0
0 -A/L 0
1 0 0
0 V/L 0
0
0 1
6. Reverse [R]y
7. Reverse [R]x
V/L 0 A/L 0
[R]y-1= 0 1 0 0
-A/L 0 V/L 0
0 0 0 1
1
[R]x-1= 0
0
0
0
1
0
0
0 6
0 -22
1 0
0 1
0
0 0
C/V B/V 0
-B/V
B/V C/V 0
0
0 1
9 Calculate
9.
C l l t the
th total
t t l transformation
t
f
ti
p3
p4
CCW
original
60
120
180