In [1]:
import SymPy: symbols, sympy, Sym
using GAlgebra
In [2]:
galgebra.printer.Format()
The following follows definitions in Homogeneous Coordinates for Computational Geometry by Hestenes and Rockwood.
In [3]:
CGA3D = galgebra.ga.Ga("e_1 e_2 e_3 e e_{0}", g="1 0 0 0 0,0 1 0 0 0,0 0 1 0 0,0 0 0 0 -1,0 0 0 -1 0")
Out[3]:
In [4]:
galgebra.ga.Ga.dual_mode_value = "Iinv+"
Out[4]:
In [5]:
sympy.Matrix(CGA3D.g)
Out[5]:
In [6]:
e1,e2,e3,e,e0 = CGA3D.mv()
e1+e2+e3+e+e0
Out[6]:
In [7]:
A = CGA3D.mv("A", "mv")
Out[7]:
In [8]:
I = CGA3D.I()
Out[8]:
In [9]:
display("text/latex", A.Fmt(2))
In [10]:
display("text/latex", (A').Fmt(2))
In [11]:
I
Out[11]:
In [12]:
(I)⁻¹
Out[12]:
In [13]:
I == - (I)⁻¹
Out[13]:
In [14]:
dual(A) == A * inv(I)
Out[14]:
In [15]:
A' == A * (I)⁻¹
Out[15]:
In [16]:
(I)⁻¹ == (I)ǂ == I^2 * I
Out[16]:
In [17]:
e'
Out[17]:
In [18]:
e0'
Out[18]:
In [ ]: