Skip to main content
Log in

Calculating ellipse overlap areas

  • Published:
Computing and Visualization in Science

Abstract

We present an approach for finding the overlap area between two ellipses that does not rely on proxy curves. The Gauss-Green formula is used to determine a segment area between two points on an ellipse. Overlap between two ellipses is calculated by combining the areas of appropriate segments and polygons in each ellipse. For four of the ten possible orientations of two ellipses, the method requires numerical determination of transverse intersection points. Approximate intersection points can be determined by solving the two implicit ellipse equations simultaneously. Alternative approaches for finding transverse intersection points are available using tools from algebraic geometry, e.g., based on solving an Eigen-problem that is related to companion matrices of the two implicit ellipse curves. Implementations in C of several algorithm options are analyzed for accuracy, precision and robustness with a range of input ellipses.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7

Similar content being viewed by others

References

  1. Böröczky, K., Reitzner, M.: Approximation of smooth convex bodies by random circumscribed polytopes. Ann. Appl. Prob. 14(1), 239–273 (2004)

    Article  MATH  Google Scholar 

  2. Boost The Boost. Polygon Library http://www.boost.org/doc/libs/1_54_0/libs/polygon/doc/index.htm

  3. Busé, L., Khalil, H., Mourrain, B.: Resultant-based methods for plane curves intersection problems. Lecture notes in computer science, pp. 75–92 (2005)

  4. Chraibi, M., Seyfried, A., Schadschneider, A.: Generalized centrifugal force model for pedestrian dynamics. Phys. Rev. E. 82(4), 046111 (2010)

    Google Scholar 

  5. Eberly, D.: The area of intersecting ellipses. Accessed at http://www.geometrictools.com/Documentation/AreaIntersectingEllipses.pdf (2010)

  6. Elkadi, M., Mourrain, B.: Symbolic-numeric tools for solving polynomial equations and applications. In: Dickenstein, A., Emiris, I. (eds.) Solving Polynomial Equations: Foundations, Algorithms, and Applications, vol. 14 of Algorithms and Computation in Mathematics, pp. 125–168. Springer, Berlin (2005)

  7. Etayo, F., Gonzalez-Vega, L., Del Rio, N.: A new approach to characterizing the relative position of two ellipses depending on one parameter. Comput. Aided Geom. Des. 23(4), 324–350 (2006)

    Article  MATH  Google Scholar 

  8. Fu, P., Walton, O.R., Harvey, J.T.: Polyarc discrete element for efficiently simulating arbitrarily shaped 2D particles. Int. J. Numer. Methods Eng. 89(5), 599–617 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  9. Gruber, P.M.: Asymptotic estimates for best and stepwise approximation of convex bodies IV. Forum Math. 10, 665–686 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  10. Han, K., Feng, Y.T., Owen, D.R.J.: Polygon-based contact resolution for superquadrics. Int. J. Numer. Methods Eng. 66, 485–501 (2006)

    Google Scholar 

  11. Ludwig, M.: Asymptotic approximation of convex curves. Arch. Math. 63, 377–384 (1994)

    Article  MATH  MathSciNet  Google Scholar 

  12. Manocha, D., Demmel, J.: Algorithms for intersecting parametric and algebraic curves I: simple intersections. ACM Transactions on Graphics (TOG) 13(1), 73–100 (1994)

    Article  MATH  Google Scholar 

  13. Mcnamee, J.M.: A 2002 update of the supplementary bibliography on roots of polynomials. J. Comput. Appl. Math. 142(2), 433–434 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  14. Nonweiler, T.R.F.: CACM Algorithm 326: Roots of low order polynomials. Communications of the ACM. 11, 4, 269–270. Translated into C and programmed by M. Dow, ANUSF, Australian National University, Canberra, Australia. Accessed at http://www.netlib.org/toms/326 (1968)

  15. Pan, V.Y.: Univariate polynomials: nearly optimal algorithms for numerical factorization and root-finding. J. Symb. Comput. 00, 1–33 (2002)

    Google Scholar 

  16. Pan, V.Y.: Solving a polynomial equation: some history and recent progress. SIAM Rev. 39(2), 187–220 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  17. Press, W.H., Flannery, B.P., Teukolsky, S.A., Vetterling, W.T.: Numerical Recipes: the Art of Scientific Computing. Cambridge University Press, New York (1992)

    Google Scholar 

  18. Steiner, A., Buckley, A.: GSL Extension for solving quartic polynomials with gsl\_poly\_complex\_solve. Accessed at http://www.network-theory.co.uk/download/gslextras/Quartic/ (2004)

  19. Zeng, Z.: Algorithm 835. ACM Trans. Math. Softw. 30(2), 218–236 (2004)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gary B. Hughes.

Additional information

Communicated by: Gabriel Wittum.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hughes, G.B., Chraibi, M. Calculating ellipse overlap areas. Comput. Visual Sci. 15, 291–301 (2012). https://doi.org/10.1007/s00791-013-0214-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00791-013-0214-3

Keywords

Navigation