Quaternions and rotation in space

ImprimirCitar

Unit quaternions provide a mathematical notation for representing the orientations and rotations of objects in three dimensions. Compared to Euler angles, they are simpler to compose and avoid the gimbal lock problem. Compared to rotation matrices, they are more efficient and more numerically stable. Quaternions are useful in applications of computer graphics, robotics, navigation, and orbital mechanics of satellites.

Introduction

It is remembered the geometric version of the product of two quaternions, q=(a,u){displaystyle q=(a,u)} and q♫=(a♫,u♫){displaystyle q'=(a',u')}Where a{displaystyle a} and a♫{displaystyle a'} are the real parts, u{displaystyle u} and u♫{displaystyle u’} are the imaginary parts, also seen as vectors of three-dimensional space R3{displaystyle mathbb {R} ^{3}:

qq♫=aa♫− − uu♫,au♫+a♫u+u× × u♫{displaystyle qq'=a'-uuu',au'+a'u+utimes u'}

Where uu♫{displaystyle uu'} designate the product to scale, and u× × u♫{displaystyle utimes u’}the vector product. We'll notice. q! ! {displaystyle {bar {q}}} the conjugated quaternion q{displaystyle q}: q! ! =(a,− − u){displaystyle {bar {q}}=(a,-u)}.

To remain in the three-dimensional space, it is necessary to disappear the actual parts. Let's take it. a=a♫=0{displaystyle a=a'=0}.

Then qq♫=(0,u)(0,u♫)=(− − uu♫,u× × u♫){displaystyle qq'=(0,u)(0,u')=(-uu',utimes u'}.

It is well known that the vector product is related to the rotation in space. Therefore, on a product basis, it must be possible to express any three-dimensional rotation. The objective is to obtain a formula similar to the complex expression of the rotation in the plane:

z♫=wz{displaystyle z'=wz}, with w=eiθ θ {displaystyle w=e^{itheta }} when it turns around the origin, and z♫=w(z− − c)+c{displaystyle z'=w(z-c)+c} if broken around the point c{displaystyle c}.

Discovering the formula

Take the easiest example: How to analytically express rotation around axis x(O,i){displaystyle x(O,i)} with an angle of 90 degrees?

The vector i{displaystyle i} He must have a role. Let's look at multiplication i{displaystyle i} on the left: ij=k{displaystyle ij=k} (like) i× × j=k{displaystyle itimes j=k}) e ik=− − j{displaystyle ik=-j} (like) i× × k=− − j{displaystyle itimes k=-j}).

It seems therefore the function f:q→ → iq{displaystyle f:qrightarrow iq} is the answer to the question. On the plane (j,k){displaystyle (j,k)} that broken function of 90 degrees. But what happens in the rest of the space? f(i)=ii=− − 1{displaystyle f(i)=ii=-1} and f(1)=i{displaystyle f(1)=i}. By linearity, we realize that it spins the plane (1,i){displaystyle} 90 degrees too, and this we don't want it! The point i{displaystyle i} has to remain still, and the function f{displaystyle f} you don't have to send a point of usual space iR+jR+kR{displaystyle iR+jR+kR} in the fourth dimension (here, 1R{displaystyle 1R}).

As we know that multiplication is not commutative in H{displaystyle mathbb {H} }, body of the quaternions, look at the product on the right, by i{displaystyle i}:

g:q→ → qi{displaystyle g:qrightarrow qi}. q(j)=ji=− − k{displaystyle q(j)=ji=-k}; q(k)=ki=j{displaystyle q(k)=ki=j} which corresponds to the reverse rotation in the plane (j,k){displaystyle (j,k)}. But g(1)=i{displaystyle g(1)=i} and g(i)=− − 1{displaystyle g(i)=-1} gives the same parasitic rotation as f{displaystyle f} on (i,j){displaystyle (i,j)}. If we take the opposite function (and reverse): h=− − g:q→ → − − qi=q(− − i){displaystyle h=-g:qrightarrow -qi=q(-i)} We realize that h{displaystyle h} has the same action on the plane (j,k){displaystyle (j,k)} that f{displaystyle f} but the opposite action (1,i){displaystyle}. Then f{displaystyle f} and h{displaystyle h} offset (1,i){displaystyle}but they accumulate in (j,k){displaystyle (j,k)}and the composite function m=forh(=horf):q→ → iq(− − i){displaystyle m=foh(=hof):qrightarrow iq(-i)} Leave the plane (1,i){displaystyle} still, but turn the plane (j,k){displaystyle (j,k)} twice 90 degrees, or 180 degrees:

m(j)=ij(− − i)=− − iji=− − ki=− − j{displaystyle m(j)=ij(-i)=-iji=-ki=-j} and m(k)=− − k{displaystyle m(k)=-k}

We have therefore obtained a rotation around axle (O,i){displaystyle (O,i)}, but with a double angle of the desired. Just split the angles of f{displaystyle f} and h{displaystyle h} for two to get the formula.

i=eiπ π 2=# π π 2+iwithout π π 2=# 90 +iwithout 90 {displaystyle i=e^{i{frac {pi }{2}}}}{cos {frac {pi }{2}}+isin {frac {pi }{2}{2}}}}}=cos 90^{circ }

The number that corresponds to the half angle is

eiπ π 4=1+i2=w{displaystyle e^{i{frac {pi }{4}}}}{frac {1+i}{sqrt {2}}}}=w}

and the function of the requested rotation is r:q→ → wqw! ! {displaystyle r:qrightarrow wq{bar {w}}}}.

This ration is generalized to any rotation axis, and not only to the three axes (O,i) (O, j) and (O, k). If you want to rotate around the axis (O,u) where you are a unit vector, you have to consider the plane (1, u) and another perpendicular plane (ortogonal) in H{displaystyle mathbb {H} }and use the number:

# θ θ 2+uwithout θ θ 2{displaystyle cos {frac {theta }{2}}}+usin {frac {theta}{2}}}}}

The Formula

Sea q=xi+andj+zk{displaystyle q=xi+yj+zk} a point (or a vector) of space, or a unit vector of the same space and θ a real. The rotation around the axis (0,u) of an angle θ sends the point q on the point q♫=a♫i+b♫j+c♫k{displaystyle q'=a'i+b'j+c'k} given by the formula:

q♫=hqh! ! {displaystyle q'=hq{bar {h}}}Where h=# θ θ 2+uwithout θ θ 2{displaystyle h=cos {frac {theta }{2}}}+usin {frac {theta }{2}}}}

To get the rotation around a shaft (c,u), where c is any point of space, it is enough to compose the previous function by two translations:

q♫=h(q− − c)h! ! +c{displaystyle q'=h(q-c){bar {h}}+c}

Note that h is a unit quaternion, as in the case of complexes.

The formula is a little more complicated than in the complex plane because we work in four dimensions with the quaternions but we want to stay in the usual three-dimensional space. A simple multiplication, to the left or to the right, would give two simultaneous rotations in two perpendicular (orthogonal) planes in four-dimensional space.

Example

Let us consider the rotation around the axis (O, i + j + k), with an angle of 120º or 2π/3 radians. We propose to calculate the image of vector j. Since the vector i + j + k is not unitary, we will divide it by its norm, obtaining the following unit vector:

u=i+j+k3{displaystyle u={frac {i+j+k}{sqrt {3}}}

The half angle is π/3, therefore

h=# π π 3+uwithout π π 3=1+i+j+k2{displaystyle h=cos {frac {pi }{3}}+usin {frac {frac {pi}{3}}}}={frac {1+i+j+k}{2}}}}}}}}

and its conjugate is

h! ! =1− − i− − j− − k2{displaystyle {bar {h}}={frac {1-i-j-k}{2}}}}}}}

The vector (or corresponding point) j will be sent in hjh~.

hjh! ! =(1+i+j+k)j(1− − i− − j− − k)4=(j+k− − 1− − i)(1− − i− − j− − k)4{displaystyle hj{bar {h}}={frac {(1+i+j+k)j(1-i-j-k)}{4}}}={frac {(j+k-1-i)(1-i-j-k)}}{4}}}}}}

and, distributing the factors, we find:

hjh! ! =(j+k+1− − i)+(k− − j+i+1)+(− − 1+i+j+k)+(− − i− − 1+k− − j)4=4k4=k{displaystyle hj{bar {h}}={frac {(j+k+1-i)+(k-j+i+i+1)+(-1+i+j+k)+(-i-1+k-j)}{4}}}{frac {4k}{4k}}

So we'd find that hkh~ = i e hih~ = j, which gives the analytical expression of rotation: r(xi+andj+zk)=zi+xj+andk{displaystyle r(xi+yj+zk)=zi+xj+yk}

Contenido relacionado

Neperian abacus

Napier's abacus is an abacus invented by John Napier who published the description of it in a work printed in Edinburgh at the end of 1617 entitled...

Isomorphism

In mathematics, an isomorphism is a homomorphism that admits an inverse. The mathematical term for isomorphism is intended to capture the idea of having the...

Cubic kilometer

A cubic kilometer is a unit of volume. It corresponds to the volume of a cube with a thousand meters on each side. It is equivalent to one teraliter and is...
Más resultados...
Tamaño del texto:
Copiar