VISH
0.2
|
A rotor is the sum of scalar with a bivector. More...
#include </home/werner/origo/vish/ocean/eagle/rotor3.hpp>
(Note that these are not member functions.)
A rotor is the sum of scalar with a bivector.
It represents the even subalgebra (for instance grade 0 and 2) of the geometric algebra of euclidean 3-space and implements the same algebraic properties as a Pauli spinor. There are 3+1 components in a rotor in 3-space.
To use a rotor to rotate a vector v around a bivector u look at rotor::operator()
Compute Rv ~R, which is the rotation of the vector v along the current vector R.
R(v) = R v ~R = (s+U) v (s-U) = (s v + U v) (s-U) = s v s + U v s - s v U - U v U = s s v + Uv s - s vU - U(v) = ss v + 2 Uv s - U(v)
To rotate a vector v with angle phi around a bivector u you may use:
bivector u; vector v; double phi; roto R = exp(u * phi); // with ||u||=1 (use unit() ) and [phi] in rad vector rotated_v = R(v);
Implement a rotation of phi degrees along the bivector U. If U is not unit, then the resulting rotor will also scale a given vector.
phi | Rotation in radians. |
Compute the exponential of a bivector, which implements a rotation as given by the norm of the bivector.
Compute the three-dimensional cross product
bool Wizt::lessValueSetPtr::operator() | ( | const bivector & | V | ) | const [related] |
Rotate a bivector. This operator is equivalent to .
The multiplication operation on two vectors implements the geometric product , thus generating a clifford algebra.
Geometrically it means the operation to sweep one vector r to a vector l, which results in a rotor.
Rotate a certain bivector by a rotor "in place".
Divide two vectors, yielding the rotation operation to sweep the second vector to the first one (or vice versa, I forgot :) ).
Compute the inverse rotor.
Compute the classical 4x4 rotation Matrix. E.g. for use with openGls: glMultMatrixd like: glMultMatrixd( RotMat.ptr() );
Interpolate between q1 (t = 0) and q2 (t = 1): q = (q2/q1)^t q1 .