-
Notifications
You must be signed in to change notification settings - Fork 64
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Projective geometric algebra #480
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 -
|
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)
|
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/ |
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
|
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 -
|
Note that p3d.I() is normalized pseudoscalar and p3d.E() is unnormalized pseudoscalar. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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?
The text was updated successfully, but these errors were encountered: