Sie sind auf Seite 1von 20

( ) ( )

( ) ( )
( ) ( )
( ) ( )
. .
cos sin
sin cos
. .
. .
cos sin
sin cos
. .
i i I I i J J
i I J
and
j I J
j j I I j J J
I I i i I j j
I i j
J i j
J J i i J j i
The dot product representation is useful
in extending this method to 3D,
since visu
u u
u u
u u
u u
= +
= +

` `
= +
= +
)
)
= +
=

` `
= +
= +
)
)
alization in 3D is otherwise dificult.
Y, J
X, I
u
Affine transformations in 2D rotation about Z
u
P
( ) ( )
: ( , )
: ( , )


cos sin sin cos
cos sin sin cos

Coordinates of P in XY frame X Y
Coordinates of P in xy frame x y
In XY frame P is XI YJ
In xy frame P is xi yj
XI YJ X i j Y i j
X i X j Y i Y j
u u u u
u u u u
+
+
+ = + +
= + +
( ) ( )
cos sin cos sin X Y i Y X j u u u u = + +
Y, J
X, I
u
Affine transformations in 2D rotation about Z
u
P
( ) ( )
cos sin cos sin
cos sin
sin cos
cos sin
sin cos
But XI YJ xi yj
xi yj X Y i Y X j
x X Y
y X Y
x X
y Y
u u u u
u u
u u
u u
u u
+ = +
+ = + +
= +


= +

(
=
` `
(

) )
Y, J
X, I
u
Affine transformations in 2D rotation about Z
u
P

cos sin
sin cos
Transformation matrix for rotation about z axis
u u
u u

(
(


Y, J
X, I
u
Affine transformations in 2D rotation about Z
u
P
( )
( )
( )
,
, ,

,
1. 0. .1
0. 1. 0 .1
1 0. 0. 1 .1
1 0
0 1 0
1 0 0 1 1
X Y X Y
X
X
X
I i J j
X x s Y y s x X s y Y s
Consider frame is translated along X only
x X s y Y
x X Y s
y X Y
X Y
x s X
y Y
= =
= + = + = =
= =
= + +
= + +
= + +

(

(
=
` `
(

(
) )
Y, J
X, I
Affine transformations in 2D translation in X
P
y, j
x, i
s
X
s
Y
( s
X
, s
Y
)
( )
( )
( )
,
, ,

,
1. 0. 0 .1
0. 1. .1
1 0. 0. 1 .1
1 0 0
0 1
1 0 0 1 1
X Y X Y
Y
Y
Y
I i J j
X x s Y y s x X s y Y s
Consider frame is translated along Y only
x X y Y s
x X Y
y X Y s
X Y
x X
y s Y
= =
= + = + = =
= =
= + +
= + +
= + +
(

(
=
` `
(

(
) )
Y, J
X, I
Affine transformations in 2D translation in Y
P
y, j
x, i
s
X
s
Y
( s
X
, s
Y
)
( )
( )
( )
,
, ,

,
1. 0. .1
0. 1. .1
1 0. 0. 1 .1
1 0
0 1
1 0 0 1 1
xX Y X Y
X Y
X
Y
X
Y
I i J j
X x s Y y s x X s y Y s
Consider frame is translated along both X and Y
x X s y Y s
x X Y s
y X Y s
X Y
x s X
y s Y
= =
= + = + = =
= =
= + +

= + +

= + +

(

(
=
` `
(

(
) )
Y, J
X, I
Affine transformations in 2D translation in X and Y
P
y, j
x, i
s
X
s
Y
( s
X
, s
Y
)
General translation
matrix in 2D

1 0
0 1
1 0 0 1 1
3 3
.
cos sin 0
sin cos 0
1 0
X
Y
Transformation from XY to frame
s X
s Y
We rewrite the rotation matrix to make it
without actually changing any values
x
y

u u
u u

(

(
=
` `
(

(
) )



=
`

)
0 1 1

(

(
`
(

(
)
Y, J
X, I
Affine transformations in 2D translation and rotation
P
, j
x, i
s
X
s
Y
( s
X
, s
Y
)
u
cos sin 0 1 0
sin cos 0 0 1
1 0 0 1 0 0 1 1
cos sin cos sin
sin cos sin cos
1 0 0 1 1
X
Y
X Y
X Y
x s X
y s Y
x s s X
y s s Y
u u
u u
u u u u
u u u u

( (

( (
=
` `
( (

( (
) )

(

(
=
` `
(

(
) )
Y, J
X, I
Affine transformations in 2D translation and rotation
P
, j
x, i
s
X
s
Y
( s
X
, s
Y
)
u
This is the relation between the moving frame and the fixed frame.
Note that the sequence of matrix multiplication is opposite to the
sequence of transformations where rotation follows translation.
cos sin
sin cos
x X Y
y X Y
s s s
s s s
u u
u u
=
=
Also note that the terms in the
last column are actually the
components of the translation
as measured in the xy frame
( s
x
, s
y
)
1 0 cos sin 0
0 1 sin cos 0
1 0 0 1 0 0 1 1
cos sin
sin cos
1 0 0 1 1
x
y
X
Y
X s x
Y s y
X s x
Y s y
u u
u u
u u
u u

( (

( (
=
` `
( (

( (
) )

(

(
=
` `
(

(
) )
Y, J
X, I
Affine transformations in 2D translation and rotation
P
, j
x, i
s
X
s
Y
( s
x
, s
y
)
u
This is the relation between the fixed frame and the moving frame.
Note that the sequence of matrix multiplication is opposite to the
sequence of transformations where translation follows rotation.
( s
x
, s
y
)
:
1 0 0 0
0 cos sin 0
0 sin cos 0
1 0 0 0 1 1
:
cos 0 sin 0
0 1 0 0
sin 0 cos 0
1 0 0 0 1 1
X
Y
Rotation about X R
x X
y Y
z Z
Rotation about Y R
x X
y Y
z Z
Rota
u
u
u u
u u
u u
u u
(
(

(
=
` `
(


(

) )

(
(

(
=
` `
(

(

) )
:
cos sin 0 0
sin cos 0 0
0 0 1 0
1 0 0 0 1 1
Z
tion about Z R
x X
y Y
z Z
u
u u
u u
(
(


(
=
` `
(

(

) )
Affine transformations in 3D rotation about X,Y or Z
Ground frame to moving frame
:
1 0 0 0
0 cos sin 0
0 sin cos 0
1 0 0 0 1 1
:
cos 0 sin 0
0 1 0 0
sin 0 cos 0
1 0 0 0 1 1
X
Y
Rotation about X R
X x
Y y
Z z
Rotation about Y R
X x
Y y
Z z
Rota
u
u
u u
u u
u u
u u
(
(


(
=
` `
(

(

) )
(
(

(
=
` `
(


(

) )
:
cos sin 0 0
sin cos 0 0
0 0 1 0
1 0 0 0 1 1
X
tion about Z R
X x
Y y
Z z
u
u u
u u

(
(

(
=
` `
(

(

) )
Affine transformations in 3D rotation about X,Y or Z
Moving frame to ground frame
Affine transformations in 3D general rotation
X, I
Y, J
Z, K
z, k
x, i
y, j
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
. . .
. . .
. . .
. . .
. . .
. . .
i i I I i J J i K K
j j I I j J J j K K and
k k I I k J J k K K
I I i i I j j I k k
J J i i J j i J k k
K K i i K j i K k k
We are extending
the dot product representation
used in 2D to 3D by simple analogy.
= + +

= + +
`

= + +
)
= + +

= + +
`

= + +
)
Affine transformations in 3D general rotation
X, I
Y, J
Z, K
z, k
x, i
y, j
( ) ( ) ( ) { }
( ) ( ) ( ) { }
( ) ( ) ( ) { }
( ) ( ) ( )
( ) ( ) ( )
. . .
. . .
. . .
. . .
. . .
xi yj zk XI YJ ZK
X I i i I j j I k k
Y J i i J j j J k k
Z K i i K j j K k k
X I i i X I j j X I k k
Y J i i Y J j j Y J k k
+ + = + +
= + +
+ + +
+ + +
= + +
+ + +
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
. . .
. . .
. . .
. . .
Z K i i Z K j j Z K k k
xi yj zk X I i i Y J i i Z K i i
X I j j Y J j j Z K j j
X I k k Y J k k Z K k k
+ + +
+ + = + +
+ + +
+ + +
Affine transformations in 3D general rotation
X, I
Y, J
Z, K
z, k
x, i
y, j
( ) ( ) ( ) { }
( ) ( ) ( ) { }
( ) ( ) ( ) { }
. . .
. . .
. . .
. . .
. . .
. . .
xi yj zk X I i Y J i Z K i i
X I j Y J j Z K j j
X I k Y J k Z K k k
x I i J i K i X
y I j J j K j Y
z I k J k K k Z
+ + = + +
+ + +
+ + +
(

(
=
` `
(

(
) )
Ground frame to moving frame
Affine transformations in 3D general rotation
X, I
Y, J
Z, K
z, k
x, i
y, j
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
. . .
. . .
. . .
. . .
. . .
. . .
XI YJ ZK xi yj zk
x i I I x i J J x i K K
y j I I y j J J y j K K
z k I I z k J J z k K K
X i I j I k I x
Y i J j J k J y
Z i K j K k K z
+ + = + +
= + +
+ + +
+ + +
(

(
=
`
(

(
)

)
Moving frame to ground frame
( )
( )
( )
( )
, ,
, ,
,
1. 0. 0. .1
0. 1. 0. .1
0. 0. 1. .1
1 0. 0. 0. 1 .1
1 0 0
0 1 0
0 0 1
1 0 0 0 1
X Y Z
X
Y
Z
X
Y
Z
I i J j K k
x X s y Y s z Z s
Consider frame is translated along X Y and Z
x X Y Z s
y X Y Z s
z X Y Z s
X Y Z
x s
y s
z s
= = =
= = =
= + + +
= + + +
= + + +
= + + +

(




=
`





)
1
X
Y
Z

(

(
`
(

(

)
Affine transformations in 3D translation in X , Y, Z
General translation
matrix in 3D
X, I
Y, J
Z, K
x, i
y, j
z, k
Affine transformations in 3D general motion
X, I
Y, J
Z, K
z, k
x, i
y, j
1 0 0
0 1 0
0 0 1
1 0 0 0 1 1
. . . 0
. . . 0
. . . 0
1 0 0 0 1 1
X
Y
Z
s X
s Y
s Z
x I i J i K i
y I j J j K j
z I k J k K k

(
(


(
=
` `
(


(

) )
(
(

(
=
` `
(

(

) )
,

,
Affine transformations in 3D general motion
X, I
Y, J
Z, K
z, k
x, i
y, j
( ) ( ) ( )
( ) ( ) ( )
. . . 0 1 0 0
. . . 0 0 1 0
. . . 0 0 0 1
1 0 0 0 1 0 0 0 1 1
. . . . . .
. . . . . .
. . .
1
X
Y
Z
X Y Z
X Y Z
x I i J i K i s X
y I j J j K j s Y
z I k J k K k s Z
x I i J i K i s I i s J i s K i
y I j J j K j s I j s J j s K j
z I k J k K k

( (
( (


( (
=
` `
( (


( (

) )





=
`


)
( ) ( ) ( )
. . .
1 0 0 0 1
X Y Z
X
Y
Z s I k s J k s K k
(
(

(
`
(


(

(
)
,

,
Ground frame to moving frame, first we translate and
then rotate, hence multiplication is in opposite sequence.
Note that the terms in the last column are simply (s
x
,s
y
,s
z
),
i.e. origin of XYZ frame as seen from xyz frame.
( s
X
, s
Y ,
s
Z
)
( s
x
, s
y ,
s
z
)
Affine transformations in 3D general motion
X, I
Y, J
Z, K
z, k
x, i
y, j
1 0 0 . . . 0
0 1 0 . . . 0
0 0 1 . . . 0
1 0 0 0 1 0 0 0 1 1
. . .
. . .
. . .
1 0 0 0 1 1
x
y
z
X
Y
Z
X s i I j I k I x
Y s i J j J k J y
Z s i K j K k K z
X i I j I k I s x
Y i J j J k J s y
Z i K j K k K s z
( (
( (

( (
=
` `
( (

( (

) )

(
(

(
=
` `
(

(

) )

,

,
Moving frame to ground frame first we
rotate then we translate. Hence multiplication
is in opposite sequence.

Das könnte Ihnen auch gefallen