Class Circle2D

java.lang.Object
inra.ijpb.geometry.Circle2D

public class Circle2D
extends java.lang.Object
Contains data for representing circle in the 2D plane. Used for the computation of largest inscribed circle.
Author:
dlegland
See Also:
LargestInscribedCircle
  • Constructor Summary

    Constructors
    Constructor Description
    Circle2D​(java.awt.geom.Point2D center, double radius)
    Creates a new Circle from a center and a radius.
  • Method Summary

    Modifier and Type Method Description
    double area()  
    java.awt.geom.Point2D getCenter()  
    double getRadius()  
    double perimeter()  

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Circle2D

      public Circle2D​(java.awt.geom.Point2D center, double radius)
      Creates a new Circle from a center and a radius.
      Parameters:
      center - the center of the circle
      radius - the radius of the circle
  • Method Details

    • area

      public double area()
      Returns:
      the area of the domain enclosed by the circle (equal to PI*R^2)
    • perimeter

      public double perimeter()
      Returns:
      the perimeter of the circle (equal to 2*PI*R).
    • getCenter

      public java.awt.geom.Point2D getCenter()
      Returns:
      the center of the circle
    • getRadius

      public double getRadius()
      Returns:
      the radius of the circle