EVA version :  1.24
enter Cl(p) or Cl(p,q) :  p+q number basis vectors up to 5  , p positive squares, q negative squares
 
> tutor2()
 
##### example : geometry : Run Script and call tutor2()   #####
Cl(3)
oriented volume :
j = e123
signature : (1,1,1)
# prolems from P. Lounesto
 
1. determine the distance d of point C from side AB
A=3e1+2e3
(0,3,0,2,0,0,0,0)
 
B=e1+e2+e3
(0,1,1,1,0,0,0,0)
 
C=e1-2e2-e3
(0,1,-2,-1,0,0,0,0)
 
d=abs1(gp(outp(C-A,B-A),inv1(B-A)))                    # formula is applicable in any dimension
8
# the area of a parallelogram, wich is twice the area ABC, is divided by AB
 
2. determine the angle ABC
 
angle=abs1(grade(log1(gp(A-B,inv1(C-B))),2))         #  |<log((A-B)/C-B))>2|
1.46435
# same as |Im(log((A-B)/(C-B)))| for complex numbers
# valid for any dimention
 
3. find the distance between two line AB and CD, D=(3,1,5)
 
D=3e1+e2+5e3
E=outp(A-B,C-D)           # E = (A-B)^(C-D)
 
d=abs1(reject(A-C,E))   # length of rejection of A-C outside the plane E
0.894431
# valid for any dimension
 
4. find a rotation sending unit vector u to unit vector v
 
u=unit1(e1+e2-e3)
(0.332,0,0,0,0.58,0.718,-0.193,0)
 
v=unit1(3e1+e3)
(0.332,0,0,0,0.58,0.719,-0.193,0)
 
s=sqrt1(gp(v,inv1(u)))    # s = sqrt(v/u)
(0.816,0,0,0,0.356,0.44,-0.119,0)
 
v=gp(s,gp(u,inv1(s)))     # v = s u/s
(0.332,0,0,0,0.58,0.719,-0.193,0)
 
# valid for any dimension
>
    geometry