16
Rotation about an Arbitrary Axis (Line)

Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Rotation about an Arbitrary Axis (Line)

Page 2: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Rotation about an Arbitrary Axis (Line)

X

Y

Z

X0X0Y0

Z0

L

P2

P1

P0

L

AB

C

uCBAL

zCuzyBuyxAux

222

0

0

0

++=

+=

+=

+=

0 < =u <=1

P0

O

P1

A B

C L

Page 3: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 1: Translate Point P0 to Origin O

[ ]⎥⎥⎥⎥

⎢⎢⎢⎢

=

1000100010001

0

0

0

zyx

Dx

z

y

O

P0

P1(A,B,C)

A B

0 [ ]To o oP x y z=

C

Page 4: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 2: Rotate Vector about X Axis to get into the x - z plane

VCVB

CBV

CBAL

=

=

+=

++=

1

1

22

222

cos

sin

θ

θ

[ ]

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

−=

⎥⎥⎥⎥

⎢⎢⎢⎢

−=

1000

00

000001

10000cossin00sincos00001

11

11

VC

VB

VB

VC

Rx θθ

θθ

X

V L

Page 5: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 3: Rotate about the Y axis to get it in the Z direction Rotate a negative angle (CW)!

LVLA

=

−=

2

2

cos

sin

θ

θ

2 2

2 2

0 0cos 0 sin 00 1 0 0 0 1 0 0sin 0 cos 0 0 00 0 0 1

0 0 0 1

y

V AL L

RA VL L

θ θ

θ θ

⎡ ⎤−⎢ ⎥⎡ ⎤⎢ ⎥⎢ ⎥⎢ ⎥⎢ ⎥⎡ ⎤ = =⎣ ⎦ ⎢ ⎥⎢ ⎥−⎢ ⎥⎢ ⎥⎢ ⎥⎣ ⎦⎢ ⎥⎣ ⎦

Page 6: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 4: Rotate angle θ about axis L

[ ]⎥⎥⎥⎥

⎢⎢⎢⎢

⎡ −

=

1000010000cossin00sincos

θθ

θθ

zR

Page 7: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 5: Reverse the rotation about the Y axis

[ ]

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

−=−

1000

000010

001

LV

LA

LA

LV

Ry [ ]

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

⎡ −

=

⎥⎥⎥⎥

⎢⎢⎢⎢

−=

1000

000010

00

10000cos0sin00100sin0cos

22

22

LV

LA

LA

LV

Ry θθ

θθ

Inverse of Rotation:

Replace θ by – θ

sin θ by – sin θ

cos θ remains cos θ (why?)

Page 8: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 6: Reverse rotation about the X axis

Rx[ ]−1 =

1 0 0 0

0 CV

BV

0

0 −BV

CV

0

0 0 0 1

⎢ ⎢ ⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥ ⎥ ⎥

[ ]

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

−=

⎥⎥⎥⎥

⎢⎢⎢⎢

−=

1000

00

000001

10000cossin00sincos00001

11

11

VC

VB

VB

VC

Rx θθ

θθ

Page 9: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Step 7: Reverse translation

D[ ]−1 =

1 0 0 x0

0 1 0 y0

0 0 1 z0

0 0 0 1

⎢ ⎢ ⎢ ⎢ ⎢

⎥ ⎥ ⎥ ⎥ ⎥

Page 10: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

Overall Transformation

1 1 1

2 1

[ ] [ ] [ ] [ ] [ ][ ][ ][ ]

[ ]x y z y xT D R R RP

R R DT P

θ− − −=

=

Page 11: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

180 120

60

original

CCW An Example

Page 12: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1

Given the point matrix (four points) on the right; and a line, NM, with point N at (6, -2, 0) and point M at (12, 8, 0). Rotate the these four points 60 degrees around line NM (alone the N to M direction) N: u=0; M: u=1

10

6619.11

0,10,6Thus0

10266

22

222

=+=

=++=

===

=

+−=

+=

CBV

CBAL

CBA

zuy

ux

1.  Calculate the constants (the Line/Axis of Rotation)

P1 P2 P3 P4

12 6 68 ( 2) 100 0 0

ABC

= − =

= − − =

= − =1

oP NP M=

=

Page 13: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

2. Translate N to the origin [D] = 1 0 0 -6 0 1 0 2 0 0 1 0 0 0 0 1

3. Rotate about the X axis [R]x = 1 0 0 0 0 C/V -B/V 0 0 B/V C/V 0 0 0 0 1

4. Rotate about the Y axis [R]y = V/L 0 -A/L 0 0 1 0 0 A/L 0 V/L 0 0 0 0 1

5. Rotate 60 degree (positive) [R]z = cos(60) -sin(60) 0 0 sin(60) cos(60) 0 0 0 0 1 0 0 0 0 1

Page 14: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

6. Reverse [R]y V/L 0 A/L 0 [R]y

-1= 0 1 0 0 -A/L 0 V/L 0 0 0 0 1

7. Reverse [R]x 1 0 0 0 [R]x

-1= 0 C/V B/V 0 0 -B/V C/V 0 0 0 0 1

8. Reverse the Translation 1 0 0 6 [D]-1 = 0 1 0 -2 0 0 1 0 0 0 0 1

Page 15: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

9. Calculate the total transformation 5.6471 10.2941 3.5000 5.6471 [P]2 = 3.4118 5.8235 -0.5000 3.4118 5.3468 0.5941 5.0498 5.3468 1.0000 1.0000 1.0000 1.0000

1 1 1 60

2 1

[ ] [ ] [ ] [ ] [ ][ ][ ][ ]

[ ]x y z y xT D R R R R D

TPR

P

− − −=

=

P1 P2 P3 P4

Page 16: Rotation about an Arbitrary Axis (Line)mech410/lectures/4_2...An Example 3 10 1 3 [P1]= 5 6 1 5 0 0 0 0 1 1 1 1 Given the point matrix (four points) on the right; and a line, NM, with

180 120

60

original

CCW