ex 1 : Find the distance of a point P (2,3,1) from the line AB, where A (1,2,0), B (3,0,-2)
 
basis(3)
P = 2e1+3e2+e3
A = e1+2e2
B = 3e1-2e3
d= abs1 ((P-B)^(A-B))/(A-B)              (this formula is applicable in any dimension)
d = 1.633
 
the area of a parallelogram, wich is twice as big as the triangle ABP, is divided by the line segment AB :
 
ex 2 : Find the distance d betwen two lines, say AB and CD
 
E = (A-B)^(C-D)
d= reject(A-C, E)                         (this formula is applicable in any dimension )
 
determine the length of the orthogonal rejection of A-C outside of the plane E = (A-B)^(C-D)
 
ex 3 : find the angle ABC  with A (5,9,0), B (2,3,0), C (8,3,0)
 
angle=|<log((A-B)/(C-B))>2|            (this formula is applicable in any dimension )
 
basis(3)
A = 5e1+9e2
B = 2e1 + 3e2
C = 8e1 + 3e2
q=gp((A-B), inv1(C-B))
angle=cabs(grade(clog(q),2)=1.107
 


ex 4 : find a rotation sending a unit vector x to the unit vector y
 
y1 = u x1/u, with u = sqrt(y1/x1)               (this formula is applicable in any dimension )
 
Cl(3)
x=e1-e2-e3
y=e1+e2-e3
x1=unit1 (x)
y1=unit1 (y)
u= sqrt1 ( inv1 (y1,x1))=0.816e0 - 0.408e12 - 0.408e23
 

ex 5 : Compute i/j+exp(kp/6)) in quaternions.
 
basis(3)
[i,j,k ]=[e12,e23,e13]
q=gp(i, inv1 (j+cexp(k*(p/6)))
q=0.433e1+0.250e2-0.5e3
   geometry
 

                           
APPLICATIONS 
exercices
mechanics
geometry
electromagnetism
Lorentz transf. APS
Lorentz transf. STA
exterior algebra
linear transf.
quaternions
spinors
STA
APS
conformal model
hogeneous model