Académique Documents
Professionnel Documents
Culture Documents
Z L
P1
P2 P1
Z0
P0 CC
Y
O
Y0 LL
X0
X AB
P0 B
A
x = Au + x0
y = Bu + y0 0 < =u <=1
z = Cu + z0
L = A2 + B 2 + C 2 u
Step 1: Translate Point P0 to Origin O
T
P0 = [ xo yo zo ] z P1(A,B,C)
1 0 0 x0 C
y
0 1 0 y0
[D] = B
0 0 1 z0
A x
O
0 0 0 1 P0
Step 2: Rotate Vector about X Axis to get into the x - z plane
L = A2 + B 2 + C 2
V = B2 + C 2
V B
L sin 1 =
V
C
cos1 =
V
1 0 0 0
1 0 0 0 C B
0 cos 0 0
1 sin 1 0 V V
[Rx ] = =
0 sin 1 cos1 0 0 B C
0
0 0 0 1 V V
0 0 0 1
X
Step 3: Rotate about the Y axis to get it in the Z direction
Rotate a negative angle (CW)!
A
sin 2 =
L
V
cos 2 =
L
V A
0 0
cos 2 0 sin 2 0 L L
0
1 0 0 0 1 0 0
Ry = =
sin 2 0 cos 2 0 A V
L 0 0
0 0 0 1 L
0 0 0 1
Step 4: Rotate angle about axis
L
cos sin 0 0
sin cos 0 0
[Rz ] =
0 0 1 0
0 0 0 1
Step 5: Reverse the rotation about the Y axis
V A V A
L 0 0 cos 2 0 sin 2 0 0
0
L L L
0 1 0 0 0 1 0
0
[ ]1
R y = A V [ ]
R y =
= 0A 1 0 0
0 0 sin 2 0 cos 2 0 V
0 0
L L
1 L L
0 0 0 1 0 0 0
0 0 0
1
Inverse of Rotation:
Replace by
sin by sin
cos remains cos (why?)
Step 6: Reverse rotation about the X axis
1 0 0 0
C B
0 0
[ x ] = VB
R
1 V
C
0 0
V V
0 0 0 1
1 0 0 0
1 0 0 0 C B
0 cos 0 0
1 sin 1 0 V V
[Rx ] = =
0 sin 1 cos1 0 0 B C
0
0 0 0 1 V V
0 0 0 1
Step 7: Reverse translation
1 0 0 x 0
0 1 0 y 0
1
[D] =
0 0 1 z 0
0 0 0 1
Overall Transformation
original
60
120 180
P1 P2 P3 P4
An Example 3 10 1 3
[P1]= 5 6 1 5
0 0 0 0
Given the point matrix (four 1 1 1 1
points) on the right; and a line,
NM, with point N at (6, -2, 0) 1. Calculate the constants
and point M at (12, 8, 0). (the Line/Axis of Rotation)
x = 6 + 6u
Rotate the these four points 60 y = 2 + 10u
degrees around line NM (alone
z=0
the N to M direction) N: u=0;
M: u=1 Thus
A = 6, B = 10, C = 0
A = 12 6 = 6
Po = N
B = 8 (2) = 10 L = A2 + B 2 + C 2 = 11.6619
P1 = M
C = 0 0 = 0 V = B 2 + C 2 = 10
2. Translate N to the origin 3. Rotate about the X axis
[D] = 1 0 0 -6 [R]x = 1 0 0 0
010 2 0 C/V -B/V 0
001 0 0 B/V C/V 0
000 1 0 0 0 1
V/L 0 A/L 0 1 0 0 0
[R]y-1= 0 1 0 0 [R]x-1= 0 C/V B/V 0
-A/L 0 V/L 0 0 -B/V C/V 0
0 0 0 1 0 0 0 1
1 0 0 6
[D]-1 = 0 1 0 -2
0 0 1 0
0 0 0 1
9. Calculate the total transformation
original
60
120 180