Hello,

With the addition of the Simpson solution to Smoothie I've been trying to do the math of Simpson and I don't understand what we're using in the processor come from

From what I can understand we have the three spheres formed by the tree arms :

r1²=(x-P1x)²+(y-P1y)²+(z+P1z)²

r2²=(x-P2x)²+(y-P2y)²+(z+P2z)²

r3²=(x-P3x)²+(y-P3y)²+(z+P3z)²

where rI is the extension of the arm (the part that will change to move the head), PIx the x coord of the point of the base of the arm and so on for y and z.

With the (0; 0; 0) in the center of the bed we have :

P1(-r*sin(60);-r*cos(60);P1z)

P2(r*sin(60);-r*cos(60);P2z)

P3(0;r;P3z)

PIz is just a calibrated value

From there I really don't see where this is coming from :

d=SIZE*1.0

i=SIZE/2.0

j=SIZE*math.sqrt(3)/2.0

x=(r1*r1-r2*r2+d*d)/(2*d)

y=(r1*r1-r3*r3-x*x+(x-i)**2+j*j)/(2*j)

z=math.sqrt(r1*r1-x*x-y*y)

It looks like it's coming from http://en.wikipedia.org/wiki/Trilateration but here we don't have an axis that goes through two of the sphere center

What am I missing ?