VISH  0.2
Public Member Functions | Friends | Related Functions
Eagle::PhysicalSpace::rotor Class Reference

A rotor is the sum of scalar with a bivector. More...

#include </home/werner/origo/vish/ocean/eagle/rotor3.hpp>

List of all members.

Public Member Functions

Friends

Related Functions

(Note that these are not member functions.)


Detailed Description

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()

Todo:
Need to implement optimization for unit rotors, such that the norm2() function always returns 1.0 without computation.

Member Function Documentation

vector Eagle::PhysicalSpace::rotor::operator() ( const vector v) const [inline]

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);
Todo:
Hmm, isn't there a sign error in the 2 s vU part? Plz verify!!

Friends And Related Function Documentation

rotor exp ( const bivector U,
double  phi 
) [related]

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.

Parameters:
phiRotation in radians.
rotor exp ( const bivector i) [related]

Compute the exponential of a bivector, which implements a rotation as given by the norm of the bivector.

vector operator% ( const vector l,
const vector r 
) [related]

Compute the three-dimensional cross product

bool Wizt::lessValueSetPtr::operator() ( const bivector V) const [related]

Rotate a bivector. This operator is equivalent to $ *R(*V) $.

Note:
Let's hope the compiler optimizes this function sufficiently.
rotor operator* ( const vector l,
const vector r 
) [related]

The multiplication operation on two vectors implements the geometric product $ lr := l.r + l^r $, thus generating a clifford algebra.

Geometrically it means the operation to sweep one vector r to a vector l, which results in a rotor.

bivector& operator*= ( bivector V,
const rotor R 
) [friend]

Rotate a certain bivector by a rotor "in place".

Note:
This is numerically not more efficient than assignment.
rotor operator/ ( const rotor l,
const rotor r 
) [related]

Note that $ l/r := l*r^{-1} \neq r^{-1} * l $

rotor operator/ ( const vector l,
const vector r 
) [related]

Divide two vectors, yielding the rotation operation to sweep the second vector to the first one (or vice versa, I forgot :) ).

rotor operator~ ( const rotor r) [related]

Compute the inverse rotor.

Note:
This is probably only correct for unit rotors...
rotor pow ( const rotor r,
double  t 
) [related]

compute the power of a rotor

Matrix< 4, 4, double > rotmatrix ( const rotor r) [related]

Compute the classical 4x4 rotation Matrix. E.g. for use with openGls: glMultMatrixd like: glMultMatrixd( RotMat.ptr() );

rotor slerp ( const rotor q1,
double  t,
const rotor q2 
) [related]

Interpolate between q1 (t = 0) and q2 (t = 1): q = (q2/q1)^t q1 .


The documentation for this class was generated from the following files: