I’m testing the implementation of an algorithm calculating the overlap area of two ellipsis.
The idea of the test is to check visually whether or not the intersection points of the ellipses (if any) are calculated correctly. If this is not the case, then the calculated area cannot be correct.
EDIT: The output of my implementation is a file with the intersection points. I plot the ellipses and the intersection points and savefig them. Visually I check the results and convince myself if the intersection points are correct.
Here is one example:

My problem is simply this visual method doesn’t scale with increasing number of tests (let’s say 1000 cases).
Any ideas how to automate this test?
Approach
Decided to post this as another answer since I took a completely fresh approach. I used the Python Imaging Library to draw two ellipses on different images with the colors red and green. I then blended the two images and counted the number of yellow pixels in the image, yellow being the composite of green and red and will become the color of the intersection area. The first ellipse will be colored red, the second green, their intersection yellow. For demonstration purposes I made the second ellipse a circle and made it fully contained in the first so that one could show it’s area should be the area of a circle that size. Because of pixels being counted one won’t get a precise answer but in this example with a resolution of 500×500 the pixel count area was 0.42% from the correct value. Of course if you increase the resolution you can expect to get more precision, but for testing purposes I would just accept a tolerance of +/- 1%. You can comment the lines out that save and show the image I’ve just included them to assist in initial debugging.
Performance
I ran a test run of calling the function 1,000 times and it finished in 13.4 seconds. So it takes about 13 milliseconds to create the three images and do a pixel count which isn’t bad performance for the task at hand.
Code
Output
Image