soit
|
X'
|
=
|
a
|
b
|
* |
X
|
donc
|
X'
= aX + bY
| |||||||
Y'
|
c
|
d
|
Y
|
Y'
= cX + dY
|
identité
|
1
|
0
|
||
|
0
|
1
|
dilatation
|
Dx
|
0
|
si
Dx et/ou Dy >1 on obtient une dilatation
| ||
0
|
Dy
|
symétrie
|
Sx
|
0
|
symétrie
/ (0,0) : Sx=Sy=-1. symétrie / axe X: Sx=1,
| ||
0
|
Sy
|
Sy=-1.
symétrie / axe Y : Sx=-1, Sy=1.
|
homothétie
|
1
|
Hxy
|
si
Hxy ou Hyx =0 : cisaillement
| ||
Hyx
|
1
|
homothétie
si Hxy=Hyx
|
rotation
|
cos
[theta]
|
-sin
[theta]
|
rotation
autour du point 0,0
| ||
sin
[theta]
|
cos
[theta]
|
remarques :
- le point (0,0) n'est jamais modifié.
- soit l'aire d'une surface S, après transformation :
|a b| S'=S*|c d|On n'a donc pas de changement d'aire si le déterminant vaut 1 (symétrie, rotation...)
la matrice inverse de |
a
|
b
|
est
|
1/D
|
* |
d
|
-b
|
||||
c
|
d
|
|
-c
|
a
|
dilatation : 1/Dx 1/Dy
symétrie : même matrice
rotation : -[theta]
application : symétrie par rapport à une droite faisant un angle [theta] avec Ox :
X'
|
=
|
cos
[theta]
|
-sin
[theta]
|
* |
1
|
0
|
* |
cos
[theta]
|
sin
[theta]
|
* |
X
|
|||||||||||
Y'
|
sin
[theta]
|
cos
[theta]
|
0
|
-1
|
-sin
[theta]
|
cos
[theta]
|
Y
|
X'
|
=
|
cos2[theta]-sin2[theta]
|
2.cos[theta].sin[theta]
|
* |
X
|
||||||||
Y'
|
2.sin[theta].cos[theta]
|
sin2[theta]-cos2[theta]
|
Y
|
La méthode précédente ne peut prendre en compte les translations. On utilise alors les coordonnées homogènes, c'est à dire que l'on représente un point par un triplet [ux,uy,u]. Ceci permet de dissocier la forme de la taille des objets. On se limite ici au cas u=1.
X'
|
a
|
b
|
ty
|
X
|
X'
= aX + bY + tx
| |||||||||||
Y'
|
=
|
c
|
d
|
tx
|
* |
Y
|
donc
|
Y'
= cX + dY + ty
| ||||||||
1
|
0
|
0
|
1
|
1
|
1
= 1
|
matrice inverse : cas général, par la même méthode que ci-dessus, on trouve :
a
|
b
|
tx
|
d
|
-b
|
ty.b-tx.d
|
|||||||
inverse de |
c
|
d
|
ty
|
=
1/(a.d-b.c)
|
* |
-c
|
a
|
tx.c-ty.a
|
||||
0
|
0
|
1
|
0
|
0
|
ad-bc
|
Pour les opérations simples, on trouvera assez facilement l'inverse par l'interprétation physique.
On utilise la même méthode mais avec des matrices 4x4 :
X'
|
1
|
0
|
0
|
tx
|
X
|
||||||||||
translation
:
|
Y'
|
=
|
0
|
1
|
0
|
ty
|
* |
Y
|
|||||||
Z'
|
0
|
0
|
1
|
tz
|
Z
|
||||||||||
1
|
0
|
0
|
0
|
1
|
1
|
X'
|
dx
|
0
|
0
|
0
|
X
|
||||||||||
dilatation
:
|
Y'
|
=
|
0
|
dy
|
0
|
0
|
* |
Y
|
|||||||
Z'
|
0
|
0
|
dz
|
0
|
Z
|
||||||||||
1
|
0
|
0
|
0
|
1
|
1
|
X'
|
Ex
|
0
|
0
|
tx
|
X
|
|||||||||||
symétrie
:
|
Y'
|
=
|
0
|
Ey
|
0
|
ty
|
* |
Y
|
/(0,0,0)
: Ex = Ey = Ez =-1
| |||||||
Z'
|
0
|
0
|
Ez
|
tz
|
Z
|
/plan
ij : Ei = Ej = 1, Ek =-1
| ||||||||||
1
|
0
|
0
|
0
|
1
|
1
|
X'
|
1
|
0
|
0
|
0
|
X
|
||||||||||
rotation /X :
|
Y'
|
=
|
0
|
c
|
-s
|
0
|
* |
Y
|
c
= cos [theta], s = sin [theta]
| ||||||
Z'
|
0
|
s
|
c
|
0
|
Z
|
||||||||||
1
|
0
|
0
|
0
|
1
|
1
|
X' | c | 0 | s | 0 | X | X' | c | -s | 0 | 0 | X | |||||||||||||||||||
rotation /Y : | Y' | = | 0 | 1 | 0 | 0 | * | Y | rotation /Z : | Y' | = | s | c | 0 | 0 | * | Y | |||||||||||||
Z' | -s | 0 | c | 0 | Z | Z' | 0 | 0 | 1 | 0 | Z | |||||||||||||||||||
1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 |
Matrice inverse : cas général :
X'
|
a
|
b
|
c
|
tx
|
X
|
X'
- tx
|
a
|
b
|
c
|
X
|
|||||||||||||||||||
Y'
|
=
|
d
|
e
|
f
|
ty
|
* |
Y
|
donc
:
|
Y'-
ty
|
=
|
d
|
e
|
f
|
* |
Y
|
||||||||||||||
Z'
|
g
|
h
|
i
|
tz
|
Z
|
Z'
- tz
|
g
|
h
|
i
|
Z
|
|||||||||||||||||||
1
|
0
|
0
|
0
|
1
|
1
|
Si D=0, il n'y a pas de solution. La matrice n'est pas inversible car la transformation n'est pas bijective (le volume V initial est transformé en V'=D*V, vaut 0 en cas d'une matrice de projection 3D -> dimension inférieure).
si D différent de 0 alors
X' - tx
|
b
|
c
|
a
|
X'
- tx
|
c
|
a
|
b
|
X'
- tx
| |||
X=1/D
|
Y'-
ty
|
e
|
f
|
Y=1/D
|
d
|
Y'-
ty
|
f
|
Z=1/D
|
d
|
e
|
Y'-
ty
|
Z'
- tz
|
h
|
i
|
g
|
Z'
- tz
|
i
|
g
|
h
|
Z'
- tz
|