Hi,
I implement PGA with galgebra. First steps are promising, I’m able to wedge and vee for building points, lines and planes.
Now I try to validate the side of my planes.
If I define Px=(1,0,0), Py=(0,1,0) and Pz=(0,0,1), then J(J(Px) \wedge J(Py) \wedge J(Pz)), the result plane is d-a-b-c=0. I was hoping to get a+b+c-d=0.
Ganja.js/coffeeshop says the same thing :
// Create a Clifford Algebra with 3,0,1 metric.
Algebra(3,0,1,()=>{
// We work in dual space. Our 1-blade's are dual-vectors (aka functionals of the form ax + by + cz + dw = 0).
// The four basis functionals are thus (x=0, y=0, z=0, w=0). In three dimensions these represent the yz, xz, xy and
// ideal plane.
// Specify a point directly (trivectors specified with overloaded e-notation.)
var point = (x,y,z)=>1e123-x*1e023+y*1e013-z*1e012;
// Planes can be defined directly using e0,e1,e2,e3
var plane = (a,b,c,d)=>d*1e0+a*1e1+b*1e2+c*1e3;
var H=point(0,-1,0), X=point(1,0,0), Y=point(0,1,0), Z=point(0,0,1),
camera=0e0;
var p = X&Y&Z;
var print_p = (p)=>"d*"+p[1].toFixed(2) + " + a*" + p[2].toFixed(2) + " + b*" + p[3].toFixed(2) + " + c*" + p[4].toFixed(2)
// Graph the 3D items
document.body.appendChild(this.graph(()=>{
var time=performance.now()/4000;
camera.set(Math.cos(time)+Math.sin(time)*1e13); // rotate around Y
return [0x444444,H,print_p(p),X,"X",Y,"Y",Z,"Z", // graph all vertices
0xffcccc,[X,Y,Z]];
},{animate:true,camera}));
});
I’m missing something. Any idea ?
Regards