Is what you are asking: Given two equations for ellipses, is there a way to construct a third equation that only represents the intersection/overlap of the two ellipses?

No. Not the intersection; but rather the entire combined area. Without the first notion of how that might be possible.

I'm a mathematician in the same way that I'm a plumber or electrician or car mechanic; I generally have the ability to lookup enough information to allow me to solve my immediate problem; but ask me about it a month or so from now and I probably can't explain how I did it.

Years ago I was asked to give a financial type help with a spreadsheet he was developing for shares. He wanted to isolate the intersections/overlaps between 3 or more spot price curves. He had an line-fitting algorithm that approximated a given curve by producing some kind of multi-term polynomial. The first term approximated the line crudely; the second term refined it; the third refined the results of the second and so on. His task was to combine the polynomials from the 3 or more spot-price curves into a single polynomial, and then iterate it between predefined limits. It was complex stuff that I won't pretend to understand.

However, what I was able to do was help him redefine his formulae, extracting common sub-terms and the like, that resulted in a 8 times reduction in his spreadsheet run times (measured in hours). Then, when he'd proven that what he was doing had some merit, I coded up a program in C to do the same calculations, that cut that time by almost another order of magnitude. I didn't have to understand the formulae; just be able to code up the parts and execute them in the right order to produce the same output for the given inputs.

From 4+ hours to just over 3 minutes. Still too slow to inform spot price dealers; but with today's hardware they are probably doing the same stuff millisecond by millisecond in automated traders.

And it was with that in mind that I thought that there might be some way to pre-process the equations of a bunch of ellipses into a polynomial whereby the first term would put (say)90% of points in or out; then the second term 90% of what's left; and so on. With short circuiting, that might be faster than testing every point against every ellipse individually.

I still think there is some possibility of deriving the polynomial; but I am simply not equipped with the tuits to see how to even begin such a thing.

Similarly for the two ancillary questions at the bottom of the OP.

I can, by projection of stuff I've seen done in other fields (maps and the like), see that both are probably feasible -- if a blind mathematician can turn a sphere inside-out without breaking the surface (topologically speaking); then mapping a multi-segment curve to a straight line is probably child's play. If you're the right child. I'm not. (Either a child or the right one :)


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". I'm with torvalds on this
In the absence of evidence, opinion is indistinguishable from prejudice. Agile (and TDD) debunked

In reply to Re^2: Graphics math. by BrowserUk
in thread Graphics math. by BrowserUk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.