damian@sol4.cs.monash.edu.au (Damian Conway) (06/05/91)
This is not an exercise. I am not a student. Is there an analytical solution to either of these (equivalent) problems. They both sound very simple (even trivial) to solve, but the math soon begins to snarl and bare its claws: Version 1: Given a point P = <x,y,z> and an ellipsoid with half-axes (A,B,C), find the point Q on the ellipsoid which is nearest P. Version 2: Given a point P, find the point Q on an ellipsoid such that the normal at Q passes through P. Why do I need this? Q marks the brightest point on a diffuse ellipsoid illuminated from P. I need to find that point in order to do fast rendering of objects. BTW: Please don't reply: 6 5 4 3 2 "Sure, you just solve K + iK + jK + kK + lK + mK + n" (Unless _you_ can solve it, of course :-) Any assistance greatly appreciated (and gratefully credited). damian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ who: Damian Conway email: damian@bruce.cs.monash.edu.au where: Dept. Computer Science phone: +61-3-565-5184 Monash University quote: "A pessimist is never disappointed." Clayton 3168 AUSTRALIA
damian@sol4.cs.monash.edu.au (Damian Conway) (06/06/91)
This is still not an exercise. I am still not a student. ;-) Further to my question: >Is there an analytical solution to either of these (equivalent) problems. >They both sound very simple (even trivial) to solve, but the math soon begins >to snarl and bare its claws: > Version 1: Given a point P = <x,y,z> and an ellipsoid with half-axes > (A,B,C), find the point Q on the ellipsoid which is > nearest P. > Version 2: Given a point P, find the point Q on an ellipsoid > such that the normal at Q passes through P. Version 3: Find the minimal distance from a given point P to the ellipsoid. Version 4: Solve for k: 2 2 2 2 2 2 A .Px B .Py C .Pz ------- + ------- + ------- = 1 2 2 2 2 2 2 (A +k) (B +k) (C +k) (This is derived by attempting to minimize |Q-P| using Lagrange multipliers.) Version 5: Find the largest sphere centred at P which does not intersect the ellipsoid. Version 6: Find a point Q with normal N on an ellipsoid, such that the cross-product N x (P-Q) = <0,0,0> Yes, I have thought about this quite a lot, and yes, it's very important to me. Thanks to those who have already responded. If I ever get a solution I will certainly post it. In the meantime, I iterate. damian ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ who: Damian Conway email: damian@bruce.cs.monash.edu.au where: Dept. Computer Science phone: +61-3-565-5184 Monash University quote: "A pessimist is never disappointed." Clayton 3168 AUSTRALIA