Constructor and Description |
---|
Circle(Point center,
double radius,
Vector normal) |
Circle(Point p0,
Point p1,
Point p2)
Circle in the plane through p0, p1, p2
|
Circle(Point center,
Point through,
Vector normal)
A circle with given center through a given point and with specified normal vector
|
Modifier and Type | Method and Description |
---|---|
Point |
getCenter()
Get the center of the circle.
|
double |
getClosestDistance(Circle cb) |
Point |
getClosestPoint(Point p)
returns the point on the circle closets to the query point p.
|
double |
getDistance(Point p) |
double |
getDistanceSquared(Point p) |
static Circle |
getEquilateralCircle(Point a,
Point b)
Create the equilateral circle of two points.
|
Point |
getFarthestPoint(Point p)
returns the point on the circle farthest from the query point p.
|
java.lang.Double |
getFirstIntersection(Circle c,
Point p,
Vector dir)
returns the smallest rotation angle (direction determined by vector dir)
needed to bring point p on this circle to be on the circle c as well.
|
java.lang.Double |
getFirstIntersection(Line line,
Point p,
Vector dir)
returns the smallest rotation angle (direction determined by vector dir)
needed to bring point p on this circle to be on the line l as well.
|
static LineSegment |
getFurthestDistance_bruteForce(Circle c1,
Circle c2) |
static LineSegment |
getFurthestDistance_centers(Circle c1,
Circle c2) |
static Point |
getFurthestPoint_bruteForce(Circle c,
Point p) |
Point[] |
getIntersection(Circle c)
Intersection of 2 circles in the same plane
|
Vector |
getNormal() |
Vector |
getNormalVector()
Get the normal of the circle.
|
Plane |
getPlane()
returns plane through this circle
|
Point |
getPoint()
return a point on the circle
|
double |
getRadius()
Get the radius of the circle.
|
void |
setCenter(Point p)
Sets the center of the circle
|
void |
toConsole()
Writes this circle to
System.out with 2 decimals precision. |
void |
toConsole(int dec)
Writes this circle to
System.out with dec decimals precision. |
java.lang.String |
toString()
Returns a string-representation of this circle formatted with two decimals precision.
|
java.lang.String |
toString(int dec)
Returns a string-representation of this circle formatted with
dec decimals precision. |
public Circle(Point center, Point through, Vector normal)
public Point getCenter()
public double getRadius()
public Vector getNormalVector()
public Vector getNormal()
public void setCenter(Point p)
public Point getPoint()
public Plane getPlane()
public Point getClosestPoint(Point p)
public Point getFarthestPoint(Point p)
public double getClosestDistance(Circle cb)
public static Circle getEquilateralCircle(Point a, Point b)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(int dec)
dec
decimals precision.public void toConsole()
System.out
with 2 decimals precision.public void toConsole(int dec)
System.out
with dec
decimals precision.public Point[] getIntersection(Circle c)
public java.lang.Double getFirstIntersection(Line line, Point p, Vector dir)
public double getDistanceSquared(Point p)
public double getDistance(Point p)
public java.lang.Double getFirstIntersection(Circle c, Point p, Vector dir)
public static LineSegment getFurthestDistance_centers(Circle c1, Circle c2)
public static LineSegment getFurthestDistance_bruteForce(Circle c1, Circle c2)