math.geom2d.curve
Interface ContinuousCurve2D
-
- All Superinterfaces:
- java.lang.Cloneable, Curve2D, GeometricObject2D, Shape2D
- All Known Subinterfaces:
- CircleLine2D, CircularShape2D, CirculinearContinuousCurve2D, CirculinearContour2D, CirculinearElement2D, CirculinearRing2D, ContinuousOrientedCurve2D, Contour2D, EllipseArcShape2D, EllipseShape2D, LinearElement2D, SmoothContour2D, SmoothCurve2D, SmoothOrientedCurve2D
- All Known Implementing Classes:
- AbstractContinuousCurve2D, AbstractLine2D, AbstractSmoothCurve2D, BoundaryPolyCirculinearCurve2D, BoundaryPolyCurve2D, Circle2D, CircleArc2D, CubicBezierCurve2D, Ellipse2D, EllipseArc2D, GenericCirculinearRing2D, HyperbolaBranch2D, HyperbolaBranchArc2D, InvertedRay2D, Line2D, LineArc2D, LinearCurve2D, LinearRing2D, LineSegment2D, Parabola2D, ParabolaArc2D, PolyCirculinearCurve2D, PolyCubicBezierCurve2D, PolyCurve2D, Polyline2D, PolyOrientedCurve2D, QuadBezierCurve2D, Ray2D, StraightLine2D
public interface ContinuousCurve2D extends Curve2D
Interface for all curves which can be drawn with one stroke. This includes closed curves (ellipses, polygon boundaries...), infinite curves (straight lines, parabolas, ...), and 'finite' curves, such as polylines, conic arcs, line segments, splines... Note that an hyperbola is compound of 2 continuous curves.Such curves accept parametric representation, in the form :
p(t)={x(t),y(t)}, withtcontained in appropriate domain. Bounds of domain of definition can be obtained by methodst0()andt1().
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description java.awt.geom.GeneralPathappendPath(java.awt.geom.GeneralPath path)Append the path of the curve to the given path.LinearCurve2DasPolyline(int n)Returns an approximation of the curve as a polyline withnline segments.CurveSet2D<? extends ContinuousCurve2D>clip(Box2D box)When a curve is clipped, the result is a set of curves.doublecurvature(double t)Computes the curvature at the given position.booleanisClosed()Returns true if the curve makes a loop, that is come back to starting point after covering the path.Vector2DleftTangent(double t)Computes the left tangent at the given position.ContinuousCurve2Dreverse()Returns the curve with same trace on the plane with parameterization in reverse order.Vector2DrightTangent(double t)Computes the right tangent at the given position.java.util.Collection<? extends SmoothCurve2D>smoothPieces()Returns a set of smooth curves.ContinuousCurve2DsubCurve(double t0, double t1)Returns a portion of the original curve, delimited by two positions on the curve.ContinuousCurve2Dtransform(AffineTransform2D trans)Transforms the curve by an affine transform.-
Methods inherited from interface math.geom2d.curve.Curve2D
asAwtShape, clone, continuousCurves, draw, firstPoint, getT0, getT1, intersections, isSingular, lastPoint, point, position, project, singularPoints, t0, t1, vertices
-
Methods inherited from interface math.geom2d.Shape2D
boundingBox, contains, contains, distance, distance, isBounded, isEmpty
-
Methods inherited from interface math.geom2d.GeometricObject2D
almostEquals
-
-
-
-
Method Detail
-
isClosed
boolean isClosed()
Returns true if the curve makes a loop, that is come back to starting point after covering the path.
-
leftTangent
Vector2D leftTangent(double t)
Computes the left tangent at the given position. If the curve is smooth at positiont, the result is the same as the tangent computed for the corresponding smooth curve, and is equal to the result of rightTangent(double). If the positiontcorresponds to a singular point, the tangent of the smooth portion beforetis computed.- Parameters:
t- the position on the curve- Returns:
- the left tangent vector at the curve for position t
-
rightTangent
Vector2D rightTangent(double t)
Computes the right tangent at the given position. If the curve is smooth at positiont, the result is the same as the tangent computed for the corresponding smooth curve, and is equal to the result of leftTangent(double). If the positiontcorresponds to a singular point, the tangent of the smooth portion aftertis computed.- Parameters:
t- the position on the curve- Returns:
- the right tangent vector at the curve for position t
-
curvature
double curvature(double t)
Computes the curvature at the given position. The curvature is finite for positionstthat correspond to smooth parts, and is infinite for singular points.- Parameters:
t- the position on the curve- Returns:
- the curvature of the curve for position t
-
smoothPieces
java.util.Collection<? extends SmoothCurve2D> smoothPieces()
Returns a set of smooth curves.
-
asPolyline
LinearCurve2D asPolyline(int n)
Returns an approximation of the curve as a polyline withnline segments. If the curve is closed, the method should return an instance of LinearRing2D. Otherwise, it returns an instance of Polyline2D.- Parameters:
n- the number of line segments- Returns:
- a polyline with
nline segments.
-
appendPath
java.awt.geom.GeneralPath appendPath(java.awt.geom.GeneralPath path)
Append the path of the curve to the given path.- Parameters:
path- a path to modify- Returns:
- the modified path
-
reverse
ContinuousCurve2D reverse()
Description copied from interface:Curve2DReturns the curve with same trace on the plane with parameterization in reverse order.
-
subCurve
ContinuousCurve2D subCurve(double t0, double t1)
Description copied from interface:Curve2DReturns a portion of the original curve, delimited by two positions on the curve.
-
clip
CurveSet2D<? extends ContinuousCurve2D> clip(Box2D box)
Description copied from interface:Curve2DWhen a curve is clipped, the result is a set of curves.
-
transform
ContinuousCurve2D transform(AffineTransform2D trans)
Description copied from interface:Curve2DTransforms the curve by an affine transform. The result is an instance of Curve2D.
-
-
DMelt 3.0 © DataMelt by jWork.ORG