versor  3.0
C++11 library for Geometric algebra
Static Public Member Functions | List of all members

Generic ND Transformations and their Generators. More...

#include <vsr_generic_op.h>

Static Public Member Functions

template<class A >
static auto rot (const A &b) -> decltype(b+1)
 ND Rotor from Bivector b. More...
 
template<class A >
static auto rotor (const A &b) -> decltype(b+1)
 ND Rotor from Bivector b. More...
 
template<class algebra >
static auto log (const GARot< algebra > &r) -> GABiv< algebra >
 Get Bivector Generator from a Rotor (Conformal or Euclidean ) More...
 
template<class algebra >
static auto log (const GABst< algebra > &r) -> GAPar< algebra >
 Get Pair Generator from a Conformal Boost. More...
 
template<class A >
static auto pl (const GARot< A > &r) -> GABiv< A >
 Normalized plane of rotation from Rotor. More...
 
template<class A >
static auto plane (const A &r) -> GABiv< A >
 Normalized plane of rotation from Rotor. More...
 
template<class A >
static VSR_PRECISION iphi (const GARot< A > &r)
 Angle of Rotation from Rotor. More...
 
template<class A >
static auto aa (const GARot< A > &r) -> GARot< A >
 Axis Angle from Rotor (WARNING NOT GENERIC) More...
 
template<class A >
static auto axisAngle (const A &r) -> auto
 Axis Angle from Rotor (WARNING NOT GENERIC) More...
 
template<class A , class B >
static auto trv (const Multivector< A, B > &a) -> auto
 Generate Local Boost at origin as exponential of a TangentVector vsr::GATnv<A> More...
 
template<class A >
static auto transversor (const A &a) -> auto
 Generate Local Boost at origin as exponential of a Point Pair. More...
 
template<typename... T>
static auto transversor (T...v) -> auto
 Generate nd transversor as exponential of a direction vector. More...
 
template<class A , class B >
static GATrs< A > trs (const Multivector< A, B > &a)
 Generate translation from any type as exponential of a direction vector. More...
 
template<class A >
static auto translator (const A &a) -> auto
 Generate translation as exponential of a direction vector. More...
 
template<typename... Ts>
static auto trs (Ts...v) -> NTrs< sizeof...(Ts)+2 >
 Generate translation as exponential of a direction vector. More...
 
template<bits::type N, class T >
static constexpr auto dil (T t) -> NDil< N >
 Generate translation as exponential of a direction vector. More...
 
template<class T >
static constexpr auto dilator (T t) -> auto
 Generate a Dilation from Origin [[[ pass in ( log(t) * .5 ) ]]]. More...
 
template<class A , class T >
static auto dil (const GAPnt< A > &p, T t) -> GATsd< A >
 Generate a Dilation from a point p by amt t. More...
 
template<class A , class T >
static constexpr auto dilator (const A &p, T t) -> auto
 Generate a Dilation from a point p by amt t. More...
 
template<class A >
static auto bst (const GAPar< A > &tp) -> decltype(tp+1)
 Generate Boost as exponential of a Point Pair Implemented from "Square Root and Logarithm of Rotors. . ." by Dorst and Valkenburg, 2011 e^B/2 = cosh(B/2) - sinh(B/2) More...
 
template<class A >
static auto boost (const A &a) -> auto
 Generate Boost as exponential of a Point Pair Implemented from "Square Root and Logarithm of Rotors. . ." by Dorst and Valkenburg, 2011. More...
 
template<class A >
static auto ratio (const GAVec< A > &a, const GAVec< A > &b) -> decltype((a *b))
 Generate general rotation as exponential of anonymous Implemented from "Square Root and Logarithm of Rotors. . ." by Dorst and Valkenburg, 2011. More...
 

Detailed Description

Generic ND Transformations and their Generators.

These can be used as-is, or put into a .cpp file for faster compilation (as is done, for example, in vsr_cga3D_op.cpp)

For instance, to create a quaternionic spin transformation nga::Gen::rotor will do the trick and be inlined, but if working in 3D conformal space cga::Gen::rotor will lead to faster compile times.

In keeping with the tendency throughout this library, functions can be written out in longform – e.g. Gen::translator – or Shorthand Syntax – e.g. Gen::trs

See also
vsr::cga::Gen for Operations documentation
Todo:
explain or fix multivector methods like .translate() that ONLY work in CGA

Member Function Documentation

template<class A >
static auto vsr::nga::Gen::aa ( const GARot< A > &  r) -> GARot<A>
inlinestatic

Axis Angle from Rotor (WARNING NOT GENERIC)

Parameters
rvsr::cga::Rotor or vsr::ega::Rotor
template<class A >
static auto vsr::nga::Gen::axisAngle ( const A &  r) -> auto
static

Axis Angle from Rotor (WARNING NOT GENERIC)

Parameters
Rotorinput
template<class A >
static auto vsr::nga::Gen::boost ( const A &  a) -> auto
static

Generate Boost as exponential of a Point Pair Implemented from "Square Root and Logarithm of Rotors. . ." by Dorst and Valkenburg, 2011.

Parameters
PointPair generator
template<class A >
static auto vsr::nga::Gen::bst ( const GAPar< A > &  tp) -> decltype( tp + 1 )
inlinestatic

Generate Boost as exponential of a Point Pair Implemented from "Square Root and Logarithm of Rotors. . ." by Dorst and Valkenburg, 2011 e^B/2 = cosh(B/2) - sinh(B/2)

Parameters
PointPair generator
template<bits::type N, class T >
static constexpr auto vsr::nga::Gen::dil ( t) -> NDil<N>
inlinestatic

Generate translation as exponential of a direction vector.

Parameters
atangent vector

Generate a Dilation from Origin

pass in ( log(t) * .5 )

Parameters
Amtt
template<class A , class T >
static auto vsr::nga::Gen::dil ( const GAPnt< A > &  p,
t 
) -> GATsd<A>
inlinestatic

Generate a Dilation from a point p by amt t.

Parameters
Pointp (or Vec)
Amtt – to pass in a relative amt (i.e. t=.5 for half size or t=2 for VSR_PRECISION), pass in std::log(t)
template<class T >
static constexpr auto vsr::nga::Gen::dilator ( t) -> auto
static

Generate a Dilation from Origin [[[ pass in ( log(t) * .5 ) ]]].

Parameters
Amtt
template<class A , class T >
static constexpr auto vsr::nga::Gen::dilator ( const A &  p,
t 
) -> auto
static

Generate a Dilation from a point p by amt t.

Parameters
Pointp (or Vec)
Amtt – to pass in a relative amt (i.e. t=.5 for half size or t=2 for VSR_PRECISION), pass in std::log(t)
template<class A >
static VSR_PRECISION vsr::nga::Gen::iphi ( const GARot< A > &  r)
inlinestatic

Angle of Rotation from Rotor.

Parameters
rvsr::cga::Rotor or vsr::ega::Rotor
template<class algebra >
static auto vsr::nga::Gen::log ( const GARot< algebra > &  r) -> GABiv<algebra>
inlinestatic

Get Bivector Generator from a Rotor (Conformal or Euclidean )

Template Parameters
algebraega or cga, auto deduced by argument type
Parameters
rvsr::cga::Rotor or vsr::ega::Rotor
Returns
vsr::cga::Bivector or vsr::ega::Bivector
template<class algebra >
static auto vsr::nga::Gen::log ( const GABst< algebra > &  r) -> GAPar<algebra>
inlinestatic

Get Pair Generator from a Conformal Boost.

Parameters
rvsr::cga::Boost
Todo:
test generic dimensionality of this log
template<class A >
static auto vsr::nga::Gen::pl ( const GARot< A > &  r) -> GABiv<A>
inlinestatic

Normalized plane of rotation from Rotor.

Parameters
rvsr::cga::Rotor or vsr::ega::Rotor
template<class A >
static auto vsr::nga::Gen::plane ( const A &  r) -> GABiv<A>
inlinestatic

Normalized plane of rotation from Rotor.

Parameters
rvsr::cga::Rotor or vsr::ega::Rotor
template<class A >
static auto vsr::nga::Gen::ratio ( const GAVec< A > &  a,
const GAVec< A > &  b 
) -> decltype( (a*b) )
inlinestatic

Generate general rotation as exponential of anonymous Implemented from "Square Root and Logarithm of Rotors. . ." by Dorst and Valkenburg, 2011.

Parameters
PointPair generator

Rotor Ratio of two Conformal vectors transforming a to b see dorst and valkenburg, basically this normalizes 1+R to give sqrt(ba)

template<class A >
static auto vsr::nga::Gen::rot ( const A &  b) -> decltype( b + 1 )
inlinestatic

ND Rotor from Bivector b.

Parameters
bvsr::cga::Bivector or vsr::ega::Bivector
template<class A >
static auto vsr::nga::Gen::rotor ( const A &  b) -> decltype( b + 1 )
inlinestatic

ND Rotor from Bivector b.

Parameters
bBivector
template<class A >
static auto vsr::nga::Gen::translator ( const A &  a) -> auto
static

Generate translation as exponential of a direction vector.

Parameters
aa direction vector
template<class A >
static auto vsr::nga::Gen::transversor ( const A &  a) -> auto
static

Generate Local Boost at origin as exponential of a Point Pair.

Parameters
atangent vector
template<typename... T>
static auto vsr::nga::Gen::transversor ( T...  v) -> auto
static

Generate nd transversor as exponential of a direction vector.

Parameters
nnumber of coordinates
template<class A , class B >
static GATrs<A> vsr::nga::Gen::trs ( const Multivector< A, B > &  a)
inlinestatic

Generate translation from any type as exponential of a direction vector.

Parameters
anymultivector (will be copied, not cast, to direction vector)
template<typename... Ts>
static auto vsr::nga::Gen::trs ( Ts...  v) -> NTrs<sizeof...(Ts)+2>
inlinestatic

Generate translation as exponential of a direction vector.

Parameters
somefloats etc
template<class A , class B >
static auto vsr::nga::Gen::trv ( const Multivector< A, B > &  a) -> auto
static

Generate Local Boost at origin as exponential of a TangentVector vsr::GATnv<A>

Parameters
atangent vector in ND cga

The documentation for this struct was generated from the following file: