System of Pythagorean Quadratics

121 Views Asked by At

I have a system of quadratics, obtained from three mechanical links, fixed at one end and free at the other. The intersection point of the three free ends is required.

$AC=\sqrt{(A_x-C_x)^2+(A_y-C_y)^2+(A_z-C_z)^2}$

$BC=\sqrt{(B_x-C_x)^2+(B_y-C_y)^2+(B_z-C_z)^2}$

$FC=\sqrt{(F_x-C_x)^2+(F_y-C_y)^2+(F_z-C_z)^2}$

Where C_x,y,z are the unknowns. I am halfway through solving by substitution and it is really messy. Does anyone know of a slightly more elegant way of solving these? Any techniques I should research. I want to avoid doing it numerically if possible. Many Thanks James

2

There are 2 best solutions below

3
On BEST ANSWER

So basically what you have are three circles and you want to find the point where they intersect. I am going to show you how to use linear algebra to solve your problem with an example.

Suppose that your three circles are: $C_1=(-3, 50), r_1=41$, $C_2=(11,-2), r_2=13$, and $C_3=(13,34), r_3=25$. Let us write the equations of the three circles:

\begin{align*} x^2 + 6x + 9 + y^2 - 100y + 2500 &= 1681\\ x^2 - 22x + 121 + y^2 + 4y + 4 &= 169\\ x^2 - 26x + 169 + y^2 - 68y + 1156 &= 625 \end{align*}

After re arranging them we have:

\begin{align*} x^2 + y^2 &= -6x + 100y - 828\\ x^2 + y^2 &= 22x - 4y + 44\\ x^2 + y^2 &= 26x + 68y - 700 \end{align*}

And finally this can be transformed in the following linear system:

\begin{align*} -6x + 100y - 828 &= 22x - 4y + 44\\ -6x + 100y - 828 &= 26x + 68y - 700 \end{align*}

which reduces to:

\begin{align*} -28x + 104y &= 872\\ -32x + 32y &= 128 \end{align*}

whose solution is: $(6,10)$. The tale of the story is the following, The system of linear equations is solely formed from the data: centers and radii.

1
On

Squaring and reordering the equations yields: $$\begin{array}{ccccccccc} C_x^2 + C_y^2 + C_z^2 & = & 2A_xC_x & + & 2A_yC_y & + & 2A_zC_z & + & |AC|^2 - (A_x^2+A_y^2+A_z^2) \\ C_x^2 + C_y^2 + C_z^2 & = & 2B_xC_x & + & 2B_yC_y & + & 2B_zC_z & + & |BC|^2 - (B_x^2+B_y^2+B_z^2) \\ C_x^2 + C_y^2 + C_z^2 & = & 2F_xC_x & + & 2F_yC_y & + & 2F_zC_z & + & |FC|^2 - (F_x^2+F_y^2+F_z^2) \\ \end{array}$$

Let $A_r = |AC|^2-(A_x^2+A_y^2+A_z^2)$ (and similarly for $B_r$ and $F_r$). Subtracting the last equation from the previous two reduces this to: $$\begin{array}{ccccccc} 2(A_x-F_x)C_x & + & 2(A_y-F_y)C_y & + & 2(A_z-F_z)C_z & = & F_r - A_r \\ 2(B_x-F_x)C_x & + & 2(B_y-F_y)C_y & + & 2(B_z-F_z)C_z & = & F_r - B_r \\ \end{array}$$

This is an under-determined system of equations which can be solved to obtain the general solution in the form $(C_x,C_y,C_z)=(P_x+v_xt,P_y+v_yt,P_z+v_zt)$ for some point $P=(P_x,P_y,P_z)$ and vector $(v_x,v_y,v_z)$, where $t$ can be any real number. Plugging these into any of the first three equations above yields a quadratic equation with unknown $t$, solving of which should be easy enough (and the solution can be used to obtain $(C_x,C_y,C_z)$ afterwards).

If you're going to implement this on a computer, there are a few corner cases that might need to be considered (e.g. some coordinates of the points being equal, thus resulting in zero coefficients in the system of equations; solutions not existing; ...).