Calculating ellipse overlap areas

  Purpose:  Given the parameters of two ellipses, this function calculates
            the area of overlap between the two curves.  If the ellipses are
            disjoint, this function returns 0.0; if one ellipse is contained

            within the other, this function returns the area of the enclosed

            ellipse; if the ellipses intersect, this function returns the

            calculated area of overlap.
 

More details are inside the paper.

The program is coded in C and is published under the GNU-License.

For feedback and bug-reports please use the contact form.

AttachmentSize
version_v0.2.zip2.61 MB
overlapEllipse_v120925.zip376.52 KB
overlapEllipse.zip10.49 KB

overlapEllipse V. 0.2

This is a new version of the code (version_v0.2.zip). Some bugs are fixed. In this version a plot-program is delivered to visually control the results.
Thanks to all who used the code and reported its bugs.
Best,

New version of the code

Best of thanks to the users that reported used the code and reported problems.

Several bugs were fixed and eventually others are still waiting to be fixed. :-)

This version uses the GSL (http://www.gnu.org/software/gsl/) to calculate the roots of the polynoms. Unfortunately, this makes the code non-self-containing. I think using the netlib-functions included in the first version should still be OK.

To verify the results a Boost-Library-based function that calculates the overlapping of two polygons is integrated. In this way, the ellipses are approximated by polygons and the overlapping area is compared to the result of the overlapEllipse-code.

Please read the read-me file.

Best,