Ellipse-Ellipse overlap area
This program calculates the overlapping area of two arbitrary ellipses. It implements the algorithm published in this paper. See also the available preprint. The page if this project is here.
make
This should produce an executable (overlap
)
./overlap inputfile id
(id
is 1 or 2 to choose between two different quartic solvers)
result-File: results.txt
root-File: roots.txt
id A1 B1 H1 K1 PHI_1 A2 B2 H2 K2 PHI_2
(11 columns)
id
is a running numberAx
andBx
are semi-axes of the one ellipse with the center coordinates (Hx, Kx)
Phi_x
(x in {1, 2})
id areaE1 areaE2 OverlapAreaAnalytical OverlapAreaPolynomial rel_err
id x0 y0 x1 y1 x2 y2 ...
this file is used by the plot-script
python plot.py inputFile rootsFile resultsFile
That would produce in the directory ./cases/ a couple of png's
boost
installed (and don't want to)
then you need to set USING_BOOST
in call_ee.cpp to 0#define USING_BOOST 0
The solver of the quartic function is the central part of the code. Actually, two different solvers are used separately:
The second one is faster, however fails to calculate accurately the roots of test_5.