Class Circle

java.lang.Object
nl.tudelft.simulation.language.d2.Circle

public final class Circle extends Object
The Circle class presents a number of mathematical utility functions for circles. For now, the class only implements static helper methods. No instances of the class should be made.

Copyright (c) 2003-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.

Author:
Alexander Verbraeck
  • Method Details

    • intersection

      public static Point2D[] intersection(Point2D center0, double radius0, Point2D center1, double radius1)
      Elegant intersection algorithm from http://astronomy.swin.edu.au/~pbourke/geometry/2circle/.
      Parameters:
      center0 - Point2D; the center of the first circle
      radius0 - double; the radius of the first circle
      center1 - Point2D; the center of the second circle
      radius1 - double; the radius of the second circle
      Returns:
      the intersection