|
-
Jan 5th, 2014, 02:00 AM
#15
Re: Plot ellipse through apex and two other points
In the "normalized" form of post #6, a configuration with the line from P1 to P3 perpendicular to the axis from P2 corresponds to P2=(0, 0), P1=(u, v), P3=(u, -v), i.e. u=r, v=-s. Indeed, then us^2 - rv^2 = us^2 - u(-s)^2 = 0, so we divide by 0 to get A, which indicates this configuration is degenerate. The formula above is actually 0/0, so it can still give reasonable results "in the limit", but in any case we lose uniqueness. The two equations from #6 are then
(u/A-1)^2 + (v/B)^2 = 1
(u/A-1)^2 + (-v/B)^2 = 1,
so the second is redundant. We have simply v^2/(1 - (u/A-1)^2) = B^2 for any value of A whatsoever, so there's a whole "ray" (possibly line segment) of solutions (more if you allow hyperbolas), as Logophobic's drawing illustrates. It's somewhat unfortunate that "half the time" there is a unique solution to your problem in post #7, which is a hyperbola, and the "other half" of the time, there is a unique solution, which is an ellipse centered on m (as usual ignoring degenerate cases).
If you drew the hyperbolas, it would at least be more predictable from a user standpoint. It's clearer "why" the major axis gets arbitrarily large sometimes with hyperbolas added in; otherwise it just feels arbitrary and broken. Oh, you could also give the user control of "m" rather than forcing it to be the midpoint of P1 and P3. The algorithm works fine as-is with m not necessarily this midpoint.
Last edited by jemidiah; Jan 5th, 2014 at 02:04 AM.
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|