Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Please, how is the equation system below named exactly (to search further literature)? Does it have an analytical solution? If it doesn't, then what could be the fastest numerical method for it (preferrably, with some available C++ implementation)? All the big letters (A, ... , I) are known values.

$(A*x-B*y)^{2}+(C*x-D*y)^{2}+(x-y)^{2}=G$ $(A*x-E*z)^{2}+(C*x-F*z)^{2}+(x-z)^{2}=H$ $(E*z-B*y)^{2}+(F*z-D*y)^{2}+(z-y)^{2}=I$

BTW it is related to inverse-projecting a 3D triangle based on the screen image + knowing the triangle's edges. Intuitively (maybe I'm wrong), it should have 2 answers (x,y,z). And if it helps somehow, I actually only need the values of $(x-y)/(C*x-D*y)$

share|improve this question
1  
I'm not sure such equations have a name, other than "intersections of three quadrics". For generic $A,B,\ldots,I$, this will have only finitely many solutions. It fact it will have at most $8$ solutions (there might actually be less due to multiple solutions or solutions at infinity). Have you tried calculating a Gröbner basis? It might do the trick. –  Daniel Loughran Oct 17 '12 at 13:24
1  
The system does have solution in terms of radicals. Note that if $(x,y,z)$ is a solution, then $(-x,-y,-z)$ is also a solution. This means that if you look at the equations $(Ax-By)^{2}+(Cx-Dy)^{2}+(x-y)^{2}-G=0$ $(Ax-Ez)^{2}+(Cx-Fz)^{2}+(x-z)^{2}-H=0$ $(Ez-By)^{2}+(Fz-Dy)^{2}+(z-y)^{2}-I=0$ and elimiate the variables $y$ and $z$, this is going to give you a polynomial of degree 4 in $x^2$. Likewise, eliminating $x$ and $z$ (resp. $x$ and $y$) will give you a polynomial of degree 4 in $y^2$ (resp. degree 2 in $z^2$). Maple and Mathematica or any CAS with Grobner basis can do this easily. –  J.C. Ottem Oct 17 '12 at 21:52
    
Thanks Daniel and Mr Ottem! I can see the elimination works (tried with Maple). Solving it takes huge amount of steps, so I can't use it in practice most likely (will lose the precision long before done), but this is my intro to quadrics I guess. PS I can assume (x, y, z) are all positive - they are z-distances from camera to 3 points –  AndresN Oct 18 '12 at 14:12
    
AndresN, did you try Newton's method? Since the equations are quadrics, this should be pretty straightforward to implement and the iteration should converge pretty fast. –  J.C. Ottem Oct 18 '12 at 15:10
    
this is perhaps the only realistic way indeed, thanks! –  AndresN Oct 22 '12 at 9:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.