Is there a efficient algorithm out there to find the indicies of pixels in a general ellipse?
Essentially, what I want to do is to find the indicies in a two dimensional array that corresponds to a parameterized ellipse that spans over the "2-D surface" of possible array indicies. This problem can, as in my first Q above, be compared to the rasterization of an ellipse.
I have found some Scan Line algorithms that do what I want for axis-aligned ellipses, but now I wonder if there are any similar ones for ellipses that are skewed and rotated. There must be since vector graphics SW out there manage to fill ellipses that are skewed and/or rotated.
To clearify what I mean, I recently had one similar question to this resolved here: Special polygonial for loop in two dimensional array
/Nick
You can take the algorithms that you've found for rasterizing an ellipse and simply apply a rotation or skew transform to the coordinates before testing whether they're inside or outside the ellipse. For example, if you want to test for an ellipse rotated 45 degrees, you could do something like this:
Where Transform simply applies a 2x2 rotation matrix to x and y and puts the result in newX, newY.