|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmath.geom2d.curve.AbstractContinuousCurve2D
math.geom2d.curve.AbstractSmoothCurve2D
math.geom2d.conic.CircleArc2D
public class CircleArc2D
A circle arc, defined by the center and the radius of the containing circle, by a starting angle, and by a (signed) angle extent.
A circle arc is directed: if angle extent is positive, the arc is counter clockwise. Otherwise, it is clockwise.
A circle arc is parameterized using angle from center. The arc contains all points with a parametric equation of t, for each t between 0 and the angle extent.
| Field Summary |
|---|
| Fields inherited from interface math.geom2d.Shape2D |
|---|
ACCURACY |
| Constructor Summary | |
|---|---|
CircleArc2D()
Create a circle arc whose support circle is centered on (0,0) and has a radius equal to 1. |
|
CircleArc2D(Circle2D circle,
double startAngle,
double angleExtent)
create a new circle arc based on an already existing circle. |
|
CircleArc2D(Circle2D circle,
double startAngle,
double endAngle,
boolean direct)
create a new circle arc based on an already existing circle, specifying if arc is direct or not. |
|
CircleArc2D(double xc,
double yc,
double r,
double start,
double extent)
Base constructor with all parameters specified |
|
CircleArc2D(double xc,
double yc,
double r,
double startAngle,
double endAngle,
boolean direct)
Base constructor, for constructing arc from circle parameters, start and end angles, and by specifying whether arc is direct or not. |
|
CircleArc2D(Point2D center,
double radius,
double startAngle,
double angleExtent)
Create a new circle arc with specified point center and radius |
|
CircleArc2D(Point2D center,
double radius,
double start,
double end,
boolean direct)
Create a new circle arc with specified point center and radius, start and end angles, and by specifying whether arc is direct or not. |
|
| Method Summary | |
|---|---|
boolean |
almostEquals(GeometricObject2D obj,
double eps)
Checks if the two objects are similar up to a given threshold value. |
java.awt.geom.GeneralPath |
appendPath(java.awt.geom.GeneralPath path)
Append the path of the curve to the given path. |
Polyline2D |
asPolyline(int n)
Converts this continuous curve to an instance of LinearCurve2D with the given number of edges. |
Box2D |
boundingBox()
Returns the bounding box of the shape. |
CirculinearDomain2D |
buffer(double dist)
Computes the buffer of the shape, formed by the set of points located at a distance from the shape that is lower or equal to d. |
CurveSet2D<CircleArc2D> |
clip(Box2D box)
Clips the circle arc by a box. |
CircleArc2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D. |
boolean |
contains(double x,
double y)
Checks if the shape contains the planar point defined by (x,y). |
boolean |
contains(Point2D p)
Checks if the shape contains the given point. |
boolean |
containsAngle(double angle)
|
java.util.Collection<? extends CircleArc2D> |
continuousCurves()
Returns a collection of curves containing only this circle arc. |
static CircleArc2D |
create(Circle2D support,
double startAngle,
double angleExtent)
Deprecated. since 0.11.1 |
static CircleArc2D |
create(Circle2D support,
double startAngle,
double endAngle,
boolean direct)
Deprecated. since 0.11.1 |
static CircleArc2D |
create(Point2D center,
double radius,
double startAngle,
double angleExtent)
Deprecated. since 0.11.1 |
static CircleArc2D |
create(Point2D center,
double radius,
double startAngle,
double endAngle,
boolean direct)
Deprecated. since 0.11.1 |
double |
curvature(double t)
Returns curvature of the circle arc. |
double |
distance(double x,
double y)
Returns the distance of the shape to the given point, specified by x and y, or the distance of point to the frontier of the shape in the case of a plain (i.e. fillable) shape. |
double |
distance(Point2D p)
Returns the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape. |
void |
draw(java.awt.Graphics2D g2)
Draws the curve on the given Graphics2D object. |
boolean |
equals(java.lang.Object obj)
Two circle arc are equal if the have same center, same radius, same starting and ending angles, and same orientation. |
double |
getAngle(double position)
Returns the angle associated with the given position |
double |
getAngleExtent()
|
java.awt.geom.GeneralPath |
getGeneralPath()
|
double |
getStartAngle()
|
double |
getT0()
Deprecated. replaced by t0() |
double |
getT1()
Deprecated. replaced by t1() |
java.util.Collection<Point2D> |
intersections(LinearShape2D line)
Computes intersections of the circle arc with a line. |
boolean |
isBounded()
Returns true, as a circle arc is bounded by definition. |
boolean |
isClosed()
Returns false, as a circle arc is never closed by definition. |
boolean |
isDirect()
Returns true if the circle arc is direct, i.e. if the angle extent is positive. |
boolean |
isEmpty()
Returns false. |
boolean |
isInside(Point2D point)
Returns true if the point is 'inside' the domain bounded by the curve. |
double |
length()
|
double |
length(double pos)
|
CircleArc2D |
parallel(double dist)
Returns the circle arc parallel to this circle arc, at the distance dist. |
Point2D |
point(double t)
Returns the position of a point form the curvilinear position. |
double |
position(double length)
|
double |
position(Point2D point)
Returns relative position between 0 and the angle extent. |
double |
project(Point2D point)
Returns the position of the closest orthogonal projection of the point on the curve, or of the closest singular point. |
CircleArc2D |
reverse()
Returns the circle arc which refers to the same parent circle, but with exchanged extremities. |
double |
signedDistance(double x,
double y)
The same as distanceSigned(Point2D), but by passing 2 double as arguments. |
double |
signedDistance(Point2D p)
Returns the signed distance of the curve to the given point. |
java.util.Collection<? extends CircleArc2D> |
smoothPieces()
Returns a collection of curves containing only this circle arc. |
CircleArc2D |
subCurve(double t0,
double t1)
Returns a new CircleArc2D. |
Circle2D |
supportingCircle()
Returns the circle that contains the circle arc. |
double |
t0()
Returns 0. |
double |
t1()
Returns the last position of the circle are, which is given by the absolute angle of angle extent of this arc. |
Vector2D |
tangent(double t)
Returns the tangent of the curve at the given position. |
java.lang.String |
toString()
|
EllipseArcShape2D |
transform(AffineTransform2D trans)
Returns an instance of EllipseArc2D, or CircleArc2D if transform is a similarity. |
CirculinearElement2D |
transform(CircleInversion2D inv)
Transforms the shape by a circle inversion. |
double |
windingAngle(Point2D point)
Return the angle portion that the curve turn around the given point. |
| Methods inherited from class math.geom2d.curve.AbstractSmoothCurve2D |
|---|
isSingular, leftTangent, normal, rightTangent, singularPoints, vertices |
| Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D |
|---|
asAwtShape, firstPoint, lastPoint |
| Methods inherited from class java.lang.Object |
|---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface math.geom2d.curve.SmoothCurve2D |
|---|
normal |
| Methods inherited from interface math.geom2d.curve.ContinuousCurve2D |
|---|
leftTangent, rightTangent |
| Methods inherited from interface math.geom2d.curve.Curve2D |
|---|
asAwtShape, firstPoint, isSingular, lastPoint, singularPoints, vertices |
| Constructor Detail |
|---|
public CircleArc2D()
public CircleArc2D(Circle2D circle,
double startAngle,
double angleExtent)
public CircleArc2D(Circle2D circle,
double startAngle,
double endAngle,
boolean direct)
public CircleArc2D(Point2D center,
double radius,
double startAngle,
double angleExtent)
public CircleArc2D(Point2D center,
double radius,
double start,
double end,
boolean direct)
public CircleArc2D(double xc,
double yc,
double r,
double startAngle,
double endAngle,
boolean direct)
public CircleArc2D(double xc,
double yc,
double r,
double start,
double extent)
| Method Detail |
|---|
@Deprecated
public static CircleArc2D create(Circle2D support,
double startAngle,
double angleExtent)
@Deprecated
public static CircleArc2D create(Circle2D support,
double startAngle,
double endAngle,
boolean direct)
@Deprecated
public static CircleArc2D create(Point2D center,
double radius,
double startAngle,
double angleExtent)
@Deprecated
public static CircleArc2D create(Point2D center,
double radius,
double startAngle,
double endAngle,
boolean direct)
public boolean isDirect()
public double getStartAngle()
public double getAngleExtent()
public boolean containsAngle(double angle)
public double getAngle(double position)
public Circle2D supportingCircle()
supportingCircle in interface CircularShape2Dpublic CirculinearDomain2D buffer(double dist)
CirculinearShape2D
buffer in interface CirculinearShape2Ddist - the maximal distance between a point of the buffer and the
shape
public CircleArc2D parallel(double dist)
parallel in interface CirculinearContinuousCurve2Dparallel in interface CirculinearCurve2Dparallel in interface CirculinearElement2Ddist - the distance between the original curve and he parallel curve.
public double length()
length in interface CirculinearCurve2Dpublic double length(double pos)
length in interface CirculinearCurve2Dpublic double position(double length)
position in interface CirculinearCurve2Dpublic CirculinearElement2D transform(CircleInversion2D inv)
CirculinearShape2D
transform in interface CirculinearContinuousCurve2Dtransform in interface CirculinearCurve2Dtransform in interface CirculinearElement2Dtransform in interface CirculinearShape2Dinv - the circle inversion
public double windingAngle(Point2D point)
OrientedCurve2D
windingAngle in interface OrientedCurve2Dpoint - a point of the plane
public boolean isInside(Point2D point)
OrientedCurve2D
isInside in interface OrientedCurve2Dpoint - a point in the plane
public double signedDistance(Point2D p)
OrientedCurve2D
signedDistance in interface OrientedCurve2Dp - a point of the plane
public double signedDistance(double x,
double y)
OrientedCurve2D
signedDistance in interface OrientedCurve2Dx - x-coord of a pointy - y-coord of a point
public Vector2D tangent(double t)
SmoothCurve2D
tangent in interface SmoothCurve2Dt - a position on the curve
SmoothCurve2D.normal(double)public double curvature(double t)
curvature in interface ContinuousCurve2Dt - the position on the curve
public java.util.Collection<? extends CircleArc2D> smoothPieces()
smoothPieces in interface CirculinearContinuousCurve2DsmoothPieces in interface ContinuousCurve2DsmoothPieces in class AbstractSmoothCurve2Dpublic boolean isClosed()
isClosed in interface ContinuousCurve2Dpublic Polyline2D asPolyline(int n)
AbstractContinuousCurve2D
asPolyline in interface ContinuousCurve2DasPolyline in class AbstractContinuousCurve2Dn - the number of line segments
n line segments.ContinuousCurve2D.asPolyline(int)public double t0()
t0 in interface Curve2D@Deprecated public double getT0()
getT0 in interface Curve2Dpublic double t1()
t1 in interface Curve2D@Deprecated public double getT1()
getT1 in interface Curve2Dpublic Point2D point(double t)
point in interface Curve2Dpublic double position(Point2D point)
position in interface Curve2Dpoint - a point belonging to the curve
Curve2D.point(double)public java.util.Collection<Point2D> intersections(LinearShape2D line)
intersections in interface Curve2Dpublic double project(Point2D point)
Curve2D
project in interface Curve2Dpoint - a point to project
public CircleArc2D subCurve(double t0,
double t1)
subCurve in interface CirculinearContinuousCurve2DsubCurve in interface CirculinearCurve2DsubCurve in interface CirculinearElement2DsubCurve in interface CircularShape2DsubCurve in interface EllipseArcShape2DsubCurve in interface ContinuousCurve2DsubCurve in interface Curve2DsubCurve in interface SmoothCurve2DsubCurve in interface ContinuousOrientedCurve2DsubCurve in interface SmoothOrientedCurve2Dt0 - position of the start of the sub-curvet1 - position of the end of the sub-curve
public CircleArc2D reverse()
reverse in interface CirculinearContinuousCurve2Dreverse in interface CirculinearCurve2Dreverse in interface CirculinearElement2Dreverse in interface CircularShape2Dreverse in interface EllipseArcShape2Dreverse in interface ContinuousCurve2Dreverse in interface Curve2Dreverse in interface SmoothCurve2Dreverse in interface ContinuousOrientedCurve2Dreverse in interface OrientedCurve2Dreverse in interface SmoothOrientedCurve2Dpublic java.util.Collection<? extends CircleArc2D> continuousCurves()
continuousCurves in interface CirculinearCurve2DcontinuousCurves in interface Curve2DcontinuousCurves in class AbstractContinuousCurve2Dpublic double distance(Point2D p)
Shape2D
distance in interface Shape2D
public double distance(double x,
double y)
Shape2D
distance in interface Shape2Dpublic boolean isBounded()
isBounded in interface Shape2Dpublic CurveSet2D<CircleArc2D> clip(Box2D box)
clip in interface CirculinearContinuousCurve2Dclip in interface CirculinearCurve2Dclip in interface CirculinearElement2Dclip in interface CircularShape2Dclip in interface ContinuousCurve2Dclip in interface Curve2Dclip in interface SmoothCurve2Dclip in interface ContinuousOrientedCurve2Dclip in interface OrientedCurve2Dclip in interface SmoothOrientedCurve2Dclip in interface Shape2Dbox - the clipping box
public EllipseArcShape2D transform(AffineTransform2D trans)
transform in interface EllipseArcShape2Dtransform in interface ContinuousCurve2Dtransform in interface Curve2Dtransform in interface SmoothCurve2Dtransform in interface ContinuousOrientedCurve2Dtransform in interface OrientedCurve2Dtransform in interface SmoothOrientedCurve2Dtransform in interface Shape2Dtrans - an affine transform
public boolean contains(Point2D p)
Shape2D
contains in interface Shape2D
public boolean contains(double x,
double y)
Shape2D
contains in interface Shape2Dpublic boolean isEmpty()
isEmpty in interface Shape2Dpublic Box2D boundingBox()
Shape2D
boundingBox in interface Shape2Dpublic java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
ContinuousCurve2D
appendPath in interface ContinuousCurve2Dpath - a path to modify
public java.awt.geom.GeneralPath getGeneralPath()
public void draw(java.awt.Graphics2D g2)
Curve2D
draw in interface Curve2Ddraw in interface Shape2Ddraw in class AbstractContinuousCurve2Dg2 - the graphics to draw the curve in
public boolean almostEquals(GeometricObject2D obj,
double eps)
GeometricObject2D
almostEquals in interface GeometricObject2Dobj - the object to compareeps - a threshold value, for example the minimal coordinate difference
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic CircleArc2D clone()
Curve2D
clone in interface Curve2Dclone in class AbstractSmoothCurve2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||