luis wrote:
> Hi,
>
>
> Thanks. Since I want to do exterior algebra, I am using a null
> metric.
> Also, I am not in 3-dim and so I don't have a cross product.
>
> Let's suppose we have the following code:
>
> #######################
> #!/bin/env python
> from sympy.galgebra.GAsympy import *
> set_main(sys.modules[__name__])
> MV.setup('e0 e1 e2 e3', '0 0 0 0, 0 0 0 0, 0 0 0 0, 0 0 0 0')
> a = e0*e1*e2*e3
> ######################
>
>
> We know that in this case
>
> a = e0^e1^e2^e3 and
> *a = 1 (one)
>
> but I don't know how to obtain this value (one) with sympy,
> starting from 'a'. I suspect it should be trivial, but I
> don't see how to do.
>
> Luis
>
> ---------------------------
>
>
>
> On Jan 18, 7:24 pm, Alan Bromborsky <[email protected]> wrote:
>
>> luis wrote:
>>
>>> Hi,
>>>
>>> Is there some way in 'galgebra.GAsympy'
>>> to apply the Hodge-* operator?
>>>
>>> Thanks,
>>>
>>> Luis
>>>
>>> PS. I am using MV.setup(basis,metric) with a null metric.
>>>
>> Seehttp://en.wikipedia.org/wiki/Geometric_algebra. I think the Hodge
>> dual of a vector, v, is just the geometrics product of the vector and
>> the pseudoscalar I that is
>>
>> v* = v*I
>>
>> for 3-dimensions (signature(+++)) we have the relation that the cross
>> product of two vectors a and b is
>>
>> a x b = -I a ^ b
>>
>> where I is the pseudo-scalar and ^ is the outer (exterior) product
>>
>> seehttp://wiki.sympy.org/wiki/Geometric_Algebra_Modulefor how to set
>> up your metric.
>>
> >
>
>
I think you want (for minkowski metric)
#!/bin/env python
from sympy.galgebra.GAsympy import *
set_main(sys.modules[__name__])
MV.setup('e0 e1 e2 e3', '1 0 0 0, 0 -1 0 0, 0 0 -1 0, 0 0 0 -1')
since metric is orthogonal
a = I = e0*e1*e2*e3
or
a = I = e0^e1^e2^e3
a* = a*I = I*I = +1 or -1 depending on the metric for minkowski metric a*I = -1,
for 4-dimensional euclidian a*I = 1 (MV.setup('e0 e1 e2 e3', '1 0 0 0, 0 1 0 0,
0 0 1 0, 0 0 0 1'))
remember that for vectors a,b
a*b = a.b + a^b
geometric algebra is a clifford algebra
for higher dimension rotations let U = a^b where U**2 = -1 (always true in a
euclidian space) define the rotation
plane and theta the ammount of rotation. The the rotor is
R = cos(theta/2)+sin(theta/2)U
and the rotation of a vector x->x' is given by
x' = R*x*rev(R) (all geometric products)
where rev(R) = cos(theta/2)-sin(theta/2)U
if U**2 = 1 replace cos and sin with cosh and sinh
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---