Projective geometric algebra #502
Replies: 7 comments
-
Consider the following code - from __future__ import print_function
from sympy import Symbol, symbols, sin, cos, Rational, expand, simplify, collect
from galgebra.printer import Format, Eprint, Print_Function, xpdf, Fmt
from galgebra.ga import Ga, one, zero
from galgebra.mv import Nga, cross
g = '1 0 0 0 ,0 1 0 0 ,0 0 1 1 ,0 0 1 0 '
p3d = Ga('e_1 e_2 e_3 n',g=g)
(e1,e2,e3,n) = p3d.mv()
print('g_{ij} =',p3d.g)
print(n|n)
I = p3d.I()
print(I)
print(I*I) with following output -
|
Beta Was this translation helpful? Give feedback.
-
Remember that for conformal geometric algebra with basis e_x, e_y, e_z, n_0, n_infty the metric tensor is - so that from __future__ import print_function
from sympy import Symbol, symbols, sin, cos, Rational, expand, simplify, collect
from galgebra.printer import Format, Eprint, Print_Function, xpdf, Fmt
from galgebra.ga import Ga, one, zero
from galgebra.mv import Nga, cross
g = '1 0 0 1 ,0 1 0 1 ,0 0 1 1 ,1 1 1 0'
p3d = Ga('e_1 e_2 e_3 n',g=g)
(e1,e2,e3,n) = p3d.mv()
print('g_{ij} =',p3d.g)
print(n|n)
I = p3d.I()
print(I)
print(I*I)
|
Beta Was this translation helpful? Give feedback.
-
I think this link may be relevant to your question. My question is why not use conformal geometric algebra instead of projective? https://terathon.com/blog/projective-geometric-algebra-done-right/ |
Beta Was this translation helpful? Give feedback.
-
Then there is this code - from __future__ import print_function
from sympy import Symbol, symbols, sin, cos, Rational, expand, simplify, collect
from galgebra.printer import Format, Eprint, Print_Function, xpdf, Fmt
from galgebra.ga import Ga, one, zero
from galgebra.mv import Nga, cross
g = '1 0 0 0 ,0 1 0 0 ,0 0 1 0 ,0 0 0 0'
p3d = Ga('e_1 e_2 e_3 n',g=g,norm=False)
(e1,e2,e3,n) = p3d.mv()
print('g_{ij} =',p3d.g)
print(n|n)
I = e1^e2^e3^n
print(I)
print(I*I)
(a1,a2,a3) = symbols('a_1 a_2 a_3',real=True)
a = a1*e1+a2*e2+a3*e3
print(a)
print(a*I) with output
|
Beta Was this translation helpful? Give feedback.
-
Since galgebra tries to normalize from __future__ import print_function
from sympy import Symbol, symbols, sin, cos, Rational, expand, simplify, collect
from galgebra.printer import Format, Eprint, Print_Function, xpdf, Fmt
from galgebra.ga import Ga, one, zero
from galgebra.mv import Nga, cross
g = '1 0 0 0 ,0 1 0 0 ,0 0 1 0 ,0 0 0 0'
p3d = Ga('e_1 e_2 e_3 n',g=g,norm=False)
(e1,e2,e3,n) = p3d.mv()
print('g_{ij} =',p3d.g)
print(n|n)
I = e1^e2^e3
print(I)
print(I*I)
(a1,a2,a3) = symbols('a_1 a_2 a_3',real=True)
a = a1*e1+a2*e2+a3*e3
print(a)
a_s = -I*a
a_ss = -I*a_s
print(a_s)
print(a_ss) with output -
|
Beta Was this translation helpful? Give feedback.
-
Note that p3d.I() is normalized pseudoscalar and p3d.E() is unnormalized pseudoscalar. |
Beta Was this translation helpful? Give feedback.
-
I think #68 has some code that computes a reasonable dual for PGA. Thanks for the comments above @abrombo; I've edited them to include syntax highlighting. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with projective geometric algebra (metric: [0, 1, 1, 1] ), but I have trouble to find a way to make it work with galgebra because of the nilpotent basis vector.
For instance, this code
prints
when u* should be
u_x*e_23 - u_y*e_13 + u_z*e_12
How should I do to make it work? Is there a way to give a user-defined dualization method, or to add the antiproduct?
Beta Was this translation helpful? Give feedback.
All reactions