in reply to Graphics math.

Eureka! exstatica! There is a better way, The ellipse has 2 focal points F1 and F2 and a "length", where the pencil is, when drawing ellipses the classical way. If the point you are checking is further away from that length, then it is outside the ellipse. So: segment length from (x,y) to F1(x,y) PLUS segment length from (x,y) to F2(x,y) must not exceed "length", if it does, it is outside. Thus, the length is 4 sums and an abs, much much faster than polygons... will elaborate later (at work right now)

Replies are listed 'Best First'.
Re^2: Graphics math.
by BrowserUk (Patriarch) on Jun 04, 2015 at 12:43 UTC

    That's what I'm doing now. See the second code block in the OP.

    My question is: Given two (or more) overlapping ellipses, can I combine their formulae mathematically somehow so as to reduce the cost of testing for inclusion/exclusion?


    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