ur_rna.Utilities.geom

## Class Ellipses.Circle

- java.lang.Object
- - java.awt.geom.RectangularShape
  - - java.awt.geom.Ellipse2D
    - - java.awt.geom.Ellipse2D.Float
      - - ur_rna.Utilities.geom.Ellipses.Circle

- All Implemented Interfaces:
    java.awt.Shape, java.io.Serializable, java.lang.Cloneable
  Enclosing class:
    Ellipses

      public static class Ellipses.Circle
      extends java.awt.geom.Ellipse2D.Float

  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.awt.geom.Ellipse2D

      `java.awt.geom.Ellipse2D.Double, java.awt.geom.Ellipse2D.Float`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.awt.geom.Point2D.Float` | `_center`
    `private float` | `_radius`

    - ### Fields inherited from class java.awt.geom.Ellipse2D.Float

      `height, width, x, y`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Circle(double radius)`
    `Circle(double centerX, double centerY, double radius)`
    `Circle(java.awt.geom.Point2D center, double radius)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.awt.geom.Arc2D` | `arc(double startAngle, double arcAngle)`
    `static Ellipses.Circle` | `calcFromPoints(java.awt.geom.Point2D p1, java.awt.geom.Point2D p2, java.awt.geom.Point2D p3)` Calculate the center and radius of a circle from from 3 points on the circle.
    `static Ellipses.Circle` | `calcLeastSquaresFit(java.awt.geom.Point2D... points)`
    `java.awt.geom.Point2D.Float` | `center()`
    `void` | `center(double x, double y)`
    `void` | `center(java.awt.geom.Point2D center)`
    `double` | `getCircleX(double angle)` get the x-coordinate of the circle at the specified angle.
    `double` | `getCircleY(double angle)` get the y-coordinate of the circle at the specified angle.
    `java.awt.geom.Point2D` | `getPoint(double angle)`
    `void` | `getPoint(double angle, java.awt.geom.Point2D result)`
    `static double` | `getRadiusFromArcAndChord(double arcLength, double chordLength)` This calculates the circumference of a circle based on an arc that is cut by a chord.
    `float` | `radius()`
    `void` | `radius(double radius)`
    `void` | `setCircle(java.awt.geom.Point2D center, float radius)`
    `void` | `translate(float dx, float dy)`

    - ### Methods inherited from class java.awt.geom.Ellipse2D.Float

      `getBounds2D, getHeight, getWidth, getX, getY, isEmpty, setFrame, setFrame`

    - ### Methods inherited from class java.awt.geom.Ellipse2D

      `contains, contains, equals, getPathIterator, hashCode, intersects`

    - ### Methods inherited from class java.awt.geom.RectangularShape

      `clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal`

    - ### Methods inherited from class java.lang.Object

      `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### _center

          private java.awt.geom.Point2D.Float _center

    - #### _radius

          private float _radius

  - ### Constructor Detail

    - #### Circle

          public Circle(double radius)

    - #### Circle

          public Circle(double centerX,
                        double centerY,
                        double radius)

    - #### Circle

          public Circle(java.awt.geom.Point2D center,
                        double radius)

  - ### Method Detail

    - #### arc

          public java.awt.geom.Arc2D arc(double startAngle,
                                         double arcAngle)

    - #### calcFromPoints

          public static Ellipses.Circle calcFromPoints(java.awt.geom.Point2D p1,
                                                       java.awt.geom.Point2D p2,
                                                       java.awt.geom.Point2D p3)

      Calculate the center and radius of a circle from from 3 points on the circle.
      Parameters:
        `p1` - A point on the circle
        `p2` - A point on the circle
        `p3` - A point on the circle
      Returns:
        A Circle that contains the three given points or NULL if the circle cannot be calculated (e.g. because two or more points are identical or because all three points are co-linear).

    - #### calcLeastSquaresFit

          public static Ellipses.Circle calcLeastSquaresFit(java.awt.geom.Point2D... points)

    - #### center

          public java.awt.geom.Point2D.Float center()

    - #### center

          public void center(double x,
                             double y)

    - #### center

          public void center(java.awt.geom.Point2D center)

    - #### getCircleX

          public double getCircleX(double angle)

      get the x-coordinate of the circle at the specified angle.

    - #### getCircleY

          public double getCircleY(double angle)

      get the y-coordinate of the circle at the specified angle.

    - #### getPoint

          public java.awt.geom.Point2D getPoint(double angle)

    - #### getPoint

          public void getPoint(double angle,
                               java.awt.geom.Point2D result)

    - #### getRadiusFromArcAndChord

          public static double getRadiusFromArcAndChord(double arcLength,
                                                        double chordLength)

      This calculates the circumference of a circle based on an arc that is cut by a chord. The arc-length and the chord length are known, but the full circumference is not (and neither is the sweep angle or the radius). There is no analytical solution to the problem of how to determine the full circumference of a circle from a partial arclength and the chord length, so just estimate it roughly here.

    - #### radius

          public float radius()

    - #### radius

          public void radius(double radius)

    - #### setCircle

          public void setCircle(java.awt.geom.Point2D center,
                                float radius)

    - #### translate

          public void translate(float dx,
                                float dy)