public interface Curve2D extends Shape2D, Cloneable
Interface for piecewise smooth curves, like polylines, conics, straight lines, line segments...
Several interfaces exist to use more explicit type of curves:
ContinuousCurve2D
for finite or infinite
continuous curves, SmoothCurve2D
for curves that
admit a derivative (and hence a tangent, a curvature...) at each point,
OrientedCurve2D
that are used to
define the boundary
of a
domain
...
Points on curves are identified using curve parameterization. This parameterization is left to the implementation.
Modifier and Type | Method and Description |
---|---|
CurveSet2D<? extends Curve2D> |
clip(Box2D box)
When a curve is clipped, the result is a set of curves.
|
Curve2D |
clone()
Overrides Object declaration to ensure Curve2D implementation are
cloned as Curve2D.
|
void |
draw(Graphics2D g2)
Draws the curve on the given Graphics2D object.
|
Shape |
getAsAWTShape() |
Collection<? extends ContinuousCurve2D> |
getContinuousCurves()
Returns the collection of continuous curves which constitute this curve.
|
Point2D |
getFirstPoint()
Get the first point of the curve.
|
Collection<Point2D> |
getIntersections(LinearShape2D line)
Returns the intersection points of the curve with the specified line.
|
Point2D |
getLastPoint()
Get the last point of the curve.
|
Point2D |
getPoint(double t)
Gets the point from a parametric representation of the curve.
|
double |
getPosition(Point2D point)
Get position of the point on the curve.
|
Curve2D |
getReverseCurve()
Returns the curve with same trace on the plane with parametrization in
reverse order.
|
Collection<Point2D> |
getSingularPoints()
Returns a set of singular points, i.
|
Curve2D |
getSubCurve(double t0,
double t1)
Returns a portion of the original curve, delimited by two positions on
the curve.
|
double |
getT0()
Get value of parameter t for the first point of the curve.
|
double |
getT1()
Get value of parameter t for the last point of the curve.
|
boolean |
isSingular(double pos)
Checks if a point is singular.
|
double |
project(Point2D point)
Returns the position of the closest orthogonal projection of the point on
the curve, or of the closest singular point.
|
Curve2D |
transform(AffineTransform2D trans)
Transforms the curve by an affine transform.
|
contains, contains, getBoundingBox, getDistance, getDistance, isBounded, isEmpty
double getT0()
double getT1()
Point2D getPoint(double t)
Point2D getFirstPoint()
getPoint(getT0())
.Point2D getLastPoint()
getPoint(getT1())
.Collection<Point2D> getSingularPoints()
boolean isSingular(double pos)
pos
- the position of the point on the curvedouble getPosition(Point2D point)
point
- a point belonging to the curvedouble project(Point2D point)
point
- a point to projectCollection<Point2D> getIntersections(LinearShape2D line)
Curve2D getReverseCurve()
Collection<? extends ContinuousCurve2D> getContinuousCurves()
Curve2D getSubCurve(double t0, double t1)
t0
- position of the start of the sub-curvet1
- position of the end of the sub-curveCurve2D transform(AffineTransform2D trans)
CurveSet2D<? extends Curve2D> clip(Box2D box)
Shape getAsAWTShape()
void draw(Graphics2D g2)
Curve2D clone()
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.