One way we did it in Sphere Game engine was to:
1. Convert your ellipse to a low count polygon.
2. Use this algorithm on each pixel in your object:
inpoly.c
So you probably would have a point (x,y) and test it against the 5 olympic rings to see if it is in or out.
The algorithm is brilliant, fast and explained in: visibone inpoly
But I think you probably wanted to have the formula equation, where you isolate y^^2 and substitute that in the other equation of the second ellipse, then solve the equation to get the boundaries. The problem with that is that you get non Hilbert spaces, that is, picture a U in cartoony baloon font. Drawing a vertical line, will give you multiple contact points where you are in and out the structure, this can not be represented by a single formula, you will need to either test against each primitive (rectangle, ellipe), and that is basically what you are doing. Now 2 ellipses is of course a special case where you get a () kind of figure (forgot the mathematical name for that) and that is Hilbert. But the olympic rings together are not.
In any case, you should be able to modify the inpoly algorithm to get point in ellipse, and do that for all 5 ellipses. Or, just define 8 or 16 points in your ellipse and use the inpoly algorithm.
In reply to pixel in ellipsis:
by FreeBeerReekingMonk
in thread Graphics math.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |