Skip to main content

PGA3DMultiVector

Type Alias PGA3DMultiVector 

Source
pub type PGA3DMultiVector = CausalMultiVector<f64>;

Aliased Type§

pub struct PGA3DMultiVector { /* private fields */ }

Implementations§

Source§

impl PGA3DMultiVector

Source

pub fn new_point(x: f64, y: f64, z: f64) -> Self

Creates a point in 3D Projective Geometric Algebra (PGA).

The point $\mathbf{P}=(x, y, z, w)$ is represented as a tri-vector (dual basis).

$$\mathbf{P} = x \mathbf{e}{032} + y \mathbf{e}{013} + z \mathbf{e}{021} + w \mathbf{e}{123}$$

For a homogeneous point at $(x, y, z)$ (i.e., $w=1$), the internal data mapping is:

ComponentMathematical BladeCanonical Blade (Index)Coefficient
$w$$\mathbf{e}_{123}$$\mathbf{e}_{123}$ (Index 14)$1.0$
$x$$\mathbf{e}_{032}$$-\mathbf{e}_{023}$ (Index 13)$-x$
$y$$\mathbf{e}_{013}$$\mathbf{e}_{013}$ (Index 11)$y$
$z$$\mathbf{e}_{021}$$-\mathbf{e}_{012}$ (Index 7)$-z$

Note: The signs for $x$ and $z$ are flipped to align $\mathbf{e}{032}$ and $\mathbf{e}{021}$ with the canonical basis ordering assumed by the multivector indices.

Source

pub fn translator(x: f64, y: f64, z: f64) -> Self

Creates a translator (motor) in 3D PGA.

A translator $T$ moves geometry by a vector $d = (x, y, z)$. $$ T = 1 - \frac{1}{2} (x e_{01} + y e_{02} + z e_{03}) $$

Indices:

  • Scalar (0): 1.0
  • e01 (3): -x/2
  • e02 (5): -y/2
  • e03 (9): -z/2