The Vish Visualization Shell 0.3
Vish
Public Member Functions | Friends | List of all members
Eagle::STA::CartesianChart4D< real >::bivector Class Reference

A four-dimensional Bi-Vector which is span by two vectors to define a plane. More...

#include <elementary/eagle/STA.hpp>

Inheritance diagram for Eagle::STA::CartesianChart4D< real >::bivector:

Public Member Functions

template<char CompType>
 bivector (const bivector &l, const bivector &r, const Operator< CompType > &C)
 Generic Computational Constructor for operations on two bi-vectors.
 
template<char CompType>
 bivector (const bivector &l, const double &scalar, const Operator< CompType > &C)
 Generic Computational Constructor for operations on bi-vector and scalar.
 
template<char CompType>
 bivector (const double &scalar, const bivector &l, const Operator< CompType > &C)
 Generic Computational Constructor for operations on scalar and bi-vector.
 
 bivector (const vector &a, const vector &b)
 Construct bivector from two vectors.
 
bivector inv () const
 Compute the inverse bivector.
 
vector operator() (const vector &v) const
 Compute UvU, which is a 90 degree rotation of the vector v along the plane U.
 
bivector operator* () const
 Star operator, yields the bivector that is dual to this bi-vector.
 
bivector operator+ (const bivector &r) const
 Addition operator.
 
bivector operator- () const
 Unary minus.
 
bivector operator- (const bivector &r) const
 Subtraction operator.
 
bivector unit () const
 Yield a bivector of unit area.
 

Friends

double dot (const bivector &a, const bivector &b)
 Inner product of two bivectors (note: this actually involves an implicit metric!)
 
double norm (const bivector &v)
 The norm of a bivector.
 
double norm2 (const bivector &v)
 Compute the squared norm of a bivector, which is the area span by the plane.
 
bivector operator* (const bivector &v, double r)
 Scale bivector.
 
bivector operator* (double r, const bivector &b)
 Scale bivector.
 
bivector operator/ (const bivector &b, double r)
 Divide bivector by scalar.
 

Detailed Description

template<class real>
class Eagle::STA::CartesianChart4D< real >::bivector

A four-dimensional Bi-Vector which is span by two vectors to define a plane.

It is represented by six numbers in the STA.

Bi-vectors are useful specify rotations. The sum of a bivector and a scalar yields a rotor, which can be applied to any object such as a vector (sweeping a direction) or another bivector (sweeping a plane).

A bi-vector is constructed from two vectors:

vector A, B;
A four-dimensional Bi-Vector which is span by two vectors to define a plane.
Definition STA.hpp:356
4-dimensional vector.
Definition STA.hpp:136
Definition RefPtrPerformance.cpp:24

The wedge operator of two vectors also yields a bi-vector and is the same operation:

vector A, B;
bivector& AB = A^B;

Alternatively the bivector can be setup by explicit specification of its component, which corresponds to a normal vector. Given a bivector, the associated normal vector can be retrieved using the star operator:

vector normalA = *A;

Member Function Documentation

◆ operator()()

template<class real >
vector Eagle::STA::CartesianChart4D< real >::bivector::operator() ( const vector v) const

Compute UvU, which is a 90 degree rotation of the vector v along the plane U.

Parameters
thisThe bivector U.
vector v_rotated = U(v);

◆ operator*()

template<class real >
bivector Eagle::STA::CartesianChart4D< real >::bivector::operator* ( ) const
inline

Star operator, yields the bivector that is dual to this bi-vector.

@TODO CHECK SIGNS and http://mathworld.wolfram.com/DualBivector.html