Académique Documents
Professionnel Documents
Culture Documents
Neveu Marc
Points et Repères 3-D
X
•Axes xyz Y
[]
v1
v=v 1 x jv 2 y j v3 z j = v 2
Z
v3
v3 v
X Y
v2 v1
2 repères en rotation selon une origine
commune Z0
0 0 0 0 0 0 0
x 1= x 11 x 0 + x 12 y 0 + x 13 z 0
0 0 0 0 0 0 0
y 1 = y11 x 0 + y 12 y 0 + y 13 z 0
Z1
0 0 0 0 0 0
z 1 = z 11 x 0 + z 12 y 0 + z 13 z 0 0
Y1
X0
[ ]
0
x 11 0
y11 0
z 11
Y0
X1
[ 0 0 0
] [
x1 y1 z1 = x0 y0 z00 0 0
] 0
x 12
0
y12
0
z 12
0 0 0
x 13 y13 z 13
= 0 R1
0
x 1⋅0 x 0= 0 x T1⋅0 x 0= 0 x 11
0
x 0⋅0 y 0= 0 x 0⋅0 z 0=0
[ ][ ]
0 0 0 0
x T1 0 x 0
0
y T1 0 x 0
0
x11 y11 z 11 z T1 0 x 0
0 0 0 0 0
R 1= x12 y12 z 12 = x T1 0 y 0 0
y T1 0 y 0 0
z T1 0 y 0
0 0 0 0
x13 y13 z 13 x T1 0 z 0 0
y T1 0 z 0 0
z T1 0 z 0
Rotation autour des axes
Rotation selon z
[ ]
cos −sin 0
R z = sin cos 0
0 0 1 Z
Rotation selon x
[ ]
1 0 0
R x = 0 cos −sin
0 sin cos
X Y
Rotation selon y
[ ]
cos 0 sin
R y = 0 1 0
−sin 0 cos
Inverse d’une matrice de
rotation
Repère 0 / repère 1
1 1 1 1 1 1 1
x 0 = x 01 x1 x 02 y1 x 03 z 1
1 1 1 1 1 1 1
y 0 = y 01 x 1 y 02 y1 y 03 z 1
1
z 0 = 1 z 01 1 x1 1 z 02 1 y 1 1 z 03 1 z 1
[ ][ ]
1 1 1 1
x T0 1 x 1
1
y T0 1 x 1
1
x 01 y 01 z 01 z T0 1 x 1
1
R0 = 1 x 02 1
y 02
1
z 02 =
1
x T0 1 y1
1
y T0 1 y 1
1
z T0 1 y 1
1 1 1 1
x T0 1 z 1
1
y T0 1 z 1
1
x 03 y 03 z 03 z T0 1 z 1
1
R0 = 0 R T1
Z Z
a
a
a
X a
Y X Y
Depuis l’origine P
Depuis l’origine P
De gauche à droite
De droite à gauche
Transformations Spatiales
Représentation de l’Orientation
•Comme en 2-D....
[ ][ ][ ]
c −s 0 c 0 s c −s 0
R zyz = s c 0 0 1 0 s c 0
0 0 1 −s 0 c 0 0 1
+ Utile en robotique
- 2 solutions possibles
angles Roll, Pitch Yaw
R xyz (Φ Θ Ψ )= R z (Φ) R y (Θ) R x ( Ψ)
Z Φ
yaw
X Y
Ψ
roll Θ
Pitch
Gimbal Lock
Blocage de cardan
[ ][ ][ ]
c −s 0 c 0 s c −s 0
R zyz = s c 0 0 1 0 s c 0
0 0 1 −s 0 c 0 0 1
avec ∈[− , ] , ∈[0, ] et ∈[− , ]
Supposons que q= 0
[ ] [ ][ ][ ]
c −s 0 1 0 0 c −s 0 c −s 0
R zyz 0 = s c 0 0 1 0 s c 0 = s c 0
0 0 1 0 0 1 0 0 1 0 0 1
⃗ ,N
Dans le repère ( U ⃗ ,W
⃗)
( ) ( ) ( )
2
1 0 0 n x nx ny nx nz 0 −nz n y
R=cos ϕ 0 1 0 +(1−cos ϕ) n y n x n2y n y n z +sin ϕ n z 0 −n x
0 0 1 nz n x nz ny nz
2
−n y n x 0
Formule de Rodrigues
R(q,u) = rotation de q autour de l'axe u
Formule de Rodrigues
R , u=I sU 1−c U 2
0 −u z u y
U = uz 0 −u x
−u y u x 0
avec s = sin et c = cos
t
Rq : U =−U
[ ]
u y v z−u z v y
2 t
U v=u×v = u z v x −u x v z et U =u u −I
u x v y −u y v x
Rodrigues
interprétation
on note indifféremment v et v
v = Pv I −P
v
t t
avec P projection de v sur
u : P v = u u v = u u v
160° 80°
Id
160°
80°
(−1,0 ,0)
Point sur l'hypersphère P =
(q,f,y) = angles d'Euler
Point sur la sphère P = (L,l) Gimble Lock !
Pôles dégénérés => P= (w,x,y,z)
=> P= (w,x,y)
()
x
()
x ⃗ = y d'angle θ=2cos−1 w
P≈ rotation d'axe V
⃗ = y d'angle θ=2cos−1 w
P≈ rotation d'axe V
z
0 2 2 2 2
w + x + y + z =1
Quaternions
3
q=[ w.1 x.i y.j z.k ]=[ wv ] ∈ ℝ×ℝ
avec i 2= j 2=k 2=−1
Non commutativité
partiellement anticommutative : 1 · i = i · 1 = i mais i · j = k et j · i = -k.
y y
y
x x
z z
x y
y
z
x x
z z
Opérations sur Quaternions
Addition:
[
q 1 q 2 = w1 w2 , v 1v 2 ]
Multiplication:
[
q 1 q 2 = w 1 w2 − v 1⋅v 2 , w1 v 2 w 2 v1 v1 ×v 2 ]
Conjugué:
∗
q ∗ = [ w , v ] = [ w , −v ]
Norme:
∥q∥=q . q =[ w 2 + ( v⋅v ) ]
∗
Inverse: q ∗
−1
q =
∥q∥2
Quaternions - Rotations
Q quaternion qcq ],
Soit Q=[a , V q=∥Q∥ et v=∥v ∥
Q=q.
[ 1 1
] [ 1 v1
a , V =q. a ,
q q q qv
V
] si v ≠0 et donc q≠0
2 2
1 2 2 2 a v
comme V est normé q =a v ≡ =1
v q q
[]
x
y p= w , x , y , z
[ ]
z
w
Peut s'écrire
' ]=[0, R V
[O , V ]=[cos , sin N
]∗[0, V
]∗[cos ,−sin N
]
[ 2 , N ]
le quaternion ]
[cos , sin N
représente la rotation R[ 2 , N ]
Quaternions = Rotations
D’où p ' =[w , v ' ] ∥ p∥=∥ p '∥
Et si
[ θ
q= cos , v sin
2
θ
2 ]
alors l’effet sur p est de le tourner dans le sens
trigonométrique selon l’axe v de degres.
Donc tout quaternion unitaire represente une
rotation selon un axe.
Note : la rotation q est la même que -q
redondance
Quaternions = Rotations
Exemple: rotation du point P = [x, y, z, w] selon
le vecteur v de degres.
representation en quaternion p du point P: p=[ w , x , y , z ]
[]
Nouvelle coordonnée après rotation : x'
p '=[w , v ' ] P ' = y '
z'
w
Matrice de Rotation Conversion en
Quaternion
[ ]
w 2 x 2 −y 2 −z 2 2 xy−2 wz 2 xz2 wy
q= w , x , y , z ↦R= 2 xy2 wz w2 −x 2 y 2 −z 2 2 yz−2 wx
2 xz−2 wy 2 yz2 wx w2 − x 2 −y 2 z 2
{
2 2 2
1 m 11 m 22 m 33
w=
4
[ ]
m 32 − m 23
m 11 m 12 m 13 x=
R= m 21 m 22 m 23 ↦q=[ w , x , y , z ] where 4w
m 13 − m 31
m 31 m 32 m 33 y=
4w
m 21 − m 12
z=
4w
“Deconstruction” d’un
Quaternion
{
v
axe de rotation u=
q= ( w , v ) ⇒ ∥v∥
angle de rotation θ=cos [ w −∥v∥ ]
-1 2 2
Normalisation
R =R R R
' T 2
Composition de Rotations
par Quaternions
•Comme avec les matrices, les rotations par
quaternion sont composées de rotations de
base :
soit p' =q 1 p q 1∗ et p ' ' =q 2 p' q 2∗
∗ ∗
⇒ p' ' =q 2 (q 1 pbold q 1 )q 2 propriété de la conjugaison
∗ ∗
=(q 2 q 1) p (q 1 q 2 )
∗ ∗ ∗
mais (ab) =b a
∗
donc p ' ' =(q 2 q 1) p(q 2 q 1)
∗
soit p' ' =r p r avec r=q 2 q 1
temp=rot.mult(P1);
temp1=temp.mult(conj);
temp=rot.mult(P2);
temp2=temp.mult(conj);
temp=rot.mult(P3);
temp3=temp.mult(conj);