|
The Vish Visualization Shell 0.3
Vish
|
A rotor is the sum of scalar with a bivector. More...
#include <elementary/eagle/rotor3.hpp>
Public Member Functions | |
| bivector & | bivec () |
| Retrieve bivector component, read-only. | |
| const bivector & | bivec () const |
| Retrieve bivector component, read-only. | |
| rotor | conj () const |
| Compute the conjugate rotor. | |
| rotor | inv () const |
| Compute the inverse rotor. | |
| bivector | operator() (const bivector &V) const |
| Rotate a bivector. | |
| vector | operator() (const vector &v) const |
| The sandwich product: Compute Rv ~R, which is the rotation of the vector v by the current rotor. | |
| OddMultiVector | operator* () const |
| Applying the hodge star operator. | |
| rotor () | |
| Default constructor. | |
| rotor (const bivector &b, double r) | |
| Construct rotor from bivector and scalar. | |
| rotor (const double s) | |
| Create rotor with just scalar component, bivector is zero. | |
| rotor (const rotor &b) | |
| Copy constructor. | |
| rotor (const rotor &b, const Operator<'~'> &) | |
| Computational constructor computing the conjugate (inverse) rotor. | |
| rotor (const Vector< double, 4 > &V) | |
| Explicit construction from double. | |
| rotor (double r, const bivector &b) | |
| Construct rotor from scalar and bivector. | |
| rotor (double r, double b1, double b2, double b3) | |
| Construct rotor from four doubles. | |
| double & | scalar () |
| Retrieve scalar component, modifyable. | |
| double | scalar () const |
| Retrieve scalar component, read-only. | |
| rotor | unit () const |
| Normalize to a unit rotor (added by mr). | |
| Public Member Functions inherited from Eagle::Vector< double, 4 > | |
| Base_t & | fixed_array () |
| Provide access to the base class, writable. | |
| Vector & | operator*= (const double &value) |
| Self-multiplication. | |
| Vector & | operator+= (const Vector &v) |
| Self-addition. | |
| Vector & | operator-= (const Vector &v) |
| Self-subtraction. | |
| Vector & | operator/= (const double &value) |
| Self-division. | |
| Vector & | operator= (const Vector &src) |
| Assignment operator. | |
| void | set (const V &value) |
| Assign all values to the same scalar. | |
| constexpr | Vector () |
| Default constructor. | |
| Public Member Functions inherited from Eagle::FixedArray< double, n > | |
| void | expandMinMax (FixedArray &MinValues, FixedArray &MaxValues) const |
| Expand a range given by MinValues,MaxValues to include the values of this array, done per component. | |
| constexpr | FixedArray () noexcept |
| Default constructor. | |
| constexpr double & | get (int i) |
| writable element access | |
| constexpr const FixedArray< double, subsize > * | get_subarray () const |
| Helper class for retrieve a subset of the current array. | |
| constexpr const FixedArray< double, SIZE-1 > & | get_subdim () const |
| Mainly introduced because of Interpolate::operator[]. | |
| const FixedArray_t & | getFixedArray () const noexcept |
| convenience function for base classes | |
| constexpr double | getMax () const |
| Compute the maximum element value of this array. | |
| constexpr double | getMin () const |
| Compute the maximum element value of this array. | |
| constexpr bool | operator!= (const FixedArray< T, N > &F) const |
| Compare two arrays. | |
| constexpr bool | operator== (const FixedArray< T, N > &F) const |
| Compare two arrays. | |
| constexpr double & | operator[] (int i) |
| writeable element access operator | |
| constexpr double * | ptr (int i=0) noexcept |
| Return a pointer to the ith element, no range checking. | |
| constexpr void | set (const Value &x) |
| Set all array elements to the same value. | |
| void | setFromArray (const double *x, int length=SIZE, int offset=0) |
| Set all array elements to an array's element value. | |
| void | sort (FixedArray< int, N > &I) const |
| Sort the elements of an array into the index array. | |
Friends | |
| eagle_API rotor | operator* (const rotor &l, const rotor &r) |
| Multiply rotors, which is a concatenation operation of rotations. | |
| OddMultiVector | operator* (const rotor &R, const vector &v) |
| Multiply rotor and vector, yielding an odd multivector, the dual of a rotor. | |
| bivector & | operator*= (bivector &V, const rotor &R) |
| Rotate a certain bivector by a rotor "in place". | |
| vector & | operator*= (vector &v, const rotor &R) |
| Rotate a certain vector by a rotor "in place". | |
Related Symbols | |
(Note that these are not member symbols.) | |
| rotor | exp (const bivector &i) |
| Compute the exponential of a bivector, which implements a rotation as given by the norm of the bivector. | |
| rotor | exp (const bivector &U, double phi) |
| Implement a rotation of phi degrees along the bivector U. | |
| rotor | exp (const rotor &s) |
| Compute the exponential of a rotor (by Andrew Hamilton). | |
| rotor | ln (const rotor &s) |
| Compute the natural logarithm of a rotor (by Andrew Hamilton). | |
| vector | operator% (const vector &l, const vector &r) |
| Compute the three-dimensional cross product. | |
| bivector | operator() (const bivector &V) const |
| Rotate a bivector. | |
| rotor | operator* (const vector &l, const vector &r) |
| The multiplication operation on two vectors implements the geometric product | |
| rotor | operator+ (const bivector &U, double r) |
| Create a rotor as sum of bi-vector and scalar. | |
| rotor | operator+ (const rotor &U, double r) |
| Add a scalar value to a rotor. | |
| rotor | operator+ (double r, const bivector &U) |
| Create a rotor as sum of scalar and bi-vector. | |
| rotor | operator+ (double r, const rotor &U) |
| Add a scalar value to a rotor. | |
| rotor | operator- (const rotor &U, double r) |
| Add a scalar value to a rotor. | |
| rotor | operator- (double r, const bivector &U) |
| Create a rotor as difference of scalar and bi-vector. | |
| rotor | operator- (double r, const rotor &U) |
| Add a scalar value to a rotor. | |
| rotor | operator/ (const rotor &l, const rotor &r) |
| Note that | |
| rotor | operator/ (const vector &l, const vector &r) |
| Divide two vectors, yielding the rotation operation to sweep the second vector to the first one. | |
| rotor | operator~ (const rotor &r) |
| Compute the inverse rotor. | |
| rotor | pow (const rotor &r, double t) |
| Compute the power of a rotor. | |
| Matrix< 4, 4, double > | rotmatrix (const rotor &r) |
| Compute the classical 4x4 rotation Matrix. | |
| rotor | slerp (const rotor &r1, const rotor &r2, double t) |
| Interpolate between q1 (t = 0) and q2 (t = 1): q = (q2/q1)^t q1 . | |
Additional Inherited Members | |
| Public Types inherited from Eagle::Vector< double, 4 > | |
| enum | |
| The number of elements in this array. | |
| Public Types inherited from Eagle::FixedArray< double, n > | |
| typedef FlattenedArray_t::value_type | Element_t |
| The maximally reduced type of elements stored here. | |
| typedef GetFixedArrayType< double >::result_t | ElementAsFixedArray_t |
| Element type as fixed array, if it is convertible to a fixed array. | |
| typedef FixedArray | FixedArray_t |
| Exporting the type definition of this array cass type. | |
| typedef FixedArrayFlattener< FixedArrayOfElements_t > | FixedArrayFlattener_t |
| Internal helper class. | |
| typedef FixedArray< ElementAsFixedArray_t, N > | FixedArrayOfElements_t |
| If the value is derived from a fixed array type itself, then the FixedArrayOfElements_t is an FixedArray<FixedArray<>> type. | |
| typedef FixedArrayFlattener_t::result_t | FlattenedArray_t |
| Reduction of this array type, if it is nested, to an flattened type which contains elementary types. | |
| typedef double | value_type |
| Export the type of the respective element value type. | |
| Static Public Member Functions inherited from Eagle::FixedArray< double, n > | |
| static constexpr FixedArray | convert (const FixedArray< T, N > &F, const ConversionFunctor &CF) |
| Perform a type conversion on a given fixed array into another basis type: | |
| static constexpr dimension_t | size () |
| The number of elements here. | |
| Protected Attributes inherited from Eagle::FixedArray< double, n > | |
| double | data [SIZE] |
| The actual data values, intentional no-initialization for data member, which increases performance on vector creation. | |
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()
The sandwich product: Compute Rv ~R, which is the rotation of the vector v by the current rotor.
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:
References bivec(), Eagle::PhysicalSpace::dot(), and scalar().
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. |
References rotor().
Compute the natural logarithm of a rotor (by Andrew Hamilton).
References bivec(), Eagle::norm2(), rotor(), and unit().
Rotate a bivector.
This operator is equivalent to 
|
friend |
Multiply rotor and vector, yielding an odd multivector, the dual of a rotor.
Use its vec() member function to retrieve the vectorial part.
References rotor().
The multiplication operation on two vectors implements the geometric product 
Geometrically it means the operation to sweep one vector r to a vector l, which results in a rotor.
References Eagle::PhysicalSpace::dot(), and rotor().
Rotate a certain bivector by a rotor "in place".
References rotor().
Divide two vectors, yielding the rotation operation to sweep the second vector to the first one.
This operation is identical to (l r^-1).
References Eagle::PhysicalSpace::vector::inv(), and rotor().
Compute the classical 4x4 rotation Matrix.
E.g. for use with openGls: glMultMatrixd like: glMultMatrixd( RotMat.ptr() );
References Eagle::Matrix< R, C, Value >::column(), and rotor().