Modifier and Type | Field and Description |
---|---|
protected Point |
center |
protected double |
radius |
Constructor and Description |
---|
Circle(Circle c)
Constructs a circle that is a copy of a given circle
|
Circle(Circle c1,
Circle c2)
Creates smallest circle containing two given circles
|
Circle(Circle circle1,
Circle circle2,
Circle circle3) |
Circle(Point center,
double radius)
Construct a circle with the given center and radius.
|
Circle(Point p1,
Point p2)
Constructs a circle through two given points and wth their midpoint as the center
|
Circle(Point a,
Point b,
Point c)
Constructs a circle through 3 given points.
|
Circle(Triangle tri) |
Modifier and Type | Method and Description |
---|---|
Point |
center() |
boolean |
contains(Circle c) |
boolean |
contains(Point p) |
boolean |
contains(Point p,
double eps) |
java.lang.Double |
enteringAngle(Point p,
Circle C,
boolean ccw) |
java.lang.Double |
enteringAngle(Point p,
Line L,
boolean ccw) |
java.lang.Double |
exitingAngle(Point p,
Circle C,
boolean ccw) |
Point |
getCenter()
Get the geometric center of the shape.
|
double |
getRadius() |
Point[] |
intersections(Circle c)
returns 0-2 intersections of this circle with another circle
|
Point[] |
intersections(Line l)
returns 0-2 intersections of this circle with a line,
source: http://mathworld.wolfram.com/Circle-LineIntersection.html
some odd errors corrected 01-09-2013 - PW
|
boolean |
isEmpty(java.util.List<Point> points,
double eps)
returns TRUE if the interior of the circle (for a given eps reduction of the radius) is empty
|
static Circle |
minimumEnclosingCircle_bruteforce(java.util.List<Point> points)
Deprecated.
|
static Circle |
minimumEnclosingCircle_Welzl(java.util.List<Point> points) |
boolean |
onCircle(Point p) |
void |
setCenter(Point p) |
void |
setRadius(double r) |
void |
toConsole() |
void |
toConsole(int dec) |
void |
toScene(J2DScene scene) |
void |
toScene(J2DScene scene,
java.awt.Color clr) |
java.lang.String |
toString() |
java.lang.String |
toString(int dec) |
void |
translate(Vector v) |
protected Point center
protected double radius
public Circle(Point center, double radius)
public Circle(Circle c)
public Circle(Point p1, Point p2)
public Circle(Triangle tri)
public Point center()
public double getRadius()
public void setCenter(Point p)
public void setRadius(double r)
public void translate(Vector v)
public Point[] intersections(Circle c)
public Point[] intersections(Line l)
public static Circle minimumEnclosingCircle_Welzl(java.util.List<Point> points)
public boolean isEmpty(java.util.List<Point> points, double eps)
@Deprecated public static Circle minimumEnclosingCircle_bruteforce(java.util.List<Point> points)
public boolean contains(Point p, double eps)
public boolean contains(Circle c)
public boolean onCircle(Point p)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int dec)
public void toConsole()
public void toConsole(int dec)
public void toScene(J2DScene scene)
public void toScene(J2DScene scene, java.awt.Color clr)
public Point getCenter()
Shape