You are on page 1of 11

Computer graphics

3D Rotation transformation

3D Rotation 2
z

Rotation around axis:


- Counterclockwise, viewed from rotation axis

3D Rotation around arbitrary axis 1


1) Translate object such that the rotation axis coincides with X
axis.
2) Perform Rotation around X axis
3) Translate the object such that the rotation axis is moved back
2
to its original position

z
P y

1 Q

P
x

3D Rotation around arbitrary axis 2


Rotation around axis through two points
P1 and P1 .
1.Translate such that axis passes through
origin;
2.Rotate the object such the axis of
rotation coincides with any one axes

P2

3.Perform rotation about that axes


4.Apply inverse rotation to bring the axis
back to its original position

P1

z
5.Translate back the axis to its original
position

3D Rotation around arbitrary axis 3


P2

P1

Initial

''
2

P1'

P1'

P2'

''
2

1. translate axis

P1'

P1'

3. rotate around
z-axis

2. rotate axis
P2

P2'

x
4. rotate back

P1

x
5. translate back

3D Rotation around arbitrary axis 3


P2

P1

Initial

y
Rz()

'
1

P
P

'
1

P
''
2

3. rotate around
z-axis

2. rotate axis
P2

P2'

R1

P1

'
1

1. translate axis

''
2

T(P1)

'
1

P2'

x
4. rotate back

T(P1)
x

5. translate back

3D Rotation around arbitrary axis 3


P2

M = T(P1) R1Rz() RT(P1)


y
y
'
P2

P1

Initial

y
Rz()

'
1

P
P

'
1

P
''
2

3. rotate around
z-axis

2. rotate axis
P2

P2'

R1

P1

'
1

1. translate axis

''
2

T(P1)

'
1

x
4. rotate back

T(P1)
x

5. translate back

Rotation around an axis

Projections
Use to get a view of a solid object
Parallel
Perspective

Parallel Projection

Perspective Projection

You might also like