-
Notifications
You must be signed in to change notification settings - Fork 73
Getting wrong type of multivector #484
Copy link
Copy link
Closed
Description
I am trying to calculate the image of a 3D vector
The code is attached
gaerror.txt
import sympy
from sympy import symbols
from galgebra.ga import *
from galgebra.printer import latex
from IPython.display import Math
import math
pi=math.pi
e=math.e
sin=math.sin
cos=math.cos
# tell sympy to use our printing by default
sympy.init_printing(latex_printer=latex, use_latex='mathjax')
xyz = (x, y, z) = symbols('x y z', real=True)
o3d = Ga('e_1 e_2 e_3', g=[1, 1, 1], coords=xyz)
e_1, e_2, e_3 = o3d.mv()
I=e_1*e_2*e_3
def normed(x):
return (1/x.norm())*x
n=normed(e_1+e_2+e_3)
theta=pi/4
i=n*I
def expo(xx,tt):
return cos(tt/2)+xx*sin(tt/2)
def RR(uu,ii,tt):
return expo(-ii,tt)*uu*expo(ii,tt)
u=e_1+2*e_2+3*e_3
v=RR(u,i,theta)
vEdit: Using an updated version of galgebra as described in http://www.faculty.luther.edu/~macdonal/GAlgebraPrimer.pdf and then using the exp() method from galgebra yields exactly the same result.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels