Class BezierCurve
- All Implemented Interfaces:
Serializable
,Cloneable
,ICurve
,IGeometry
,IRotatable<BezierCurve>
,IScalable<BezierCurve>
,ITranslatable<BezierCurve>
- Direct Known Subclasses:
CubicCurve
,Line
,QuadraticCurve
Instances of the BezierCurve
class individually represent an
arbitrary Bezier curve. This is the base class of the special quadratic and
cubic Bezier curve classes (QuadraticCurve
and CubicCurve
).
- See Also:
-
Constructor Summary
ConstructorDescriptionBezierCurve
(double... controlPoints) Constructs a newBezierCurve
from the given controlPoint
coordinates.Constructs a newBezierCurve
from the givenCubicCurve
.BezierCurve
(Point... controlPoints) Constructs a newBezierCurve
from the given controlPoint
s.Constructs a newBezierCurve
from the givenQuadraticCurve
. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Overridden with public visibility as recommended withinCloneable
.boolean
Tests if thisBezierCurve
contains the given otherBezierCurve
.boolean
boolean
get
(double t) Computes thePoint
on thisBezierCurve
at parameter value t, which is expected to lie in the parameterBezierCurve.Interval
[0;1]
.getClipped
(double s, double e) getCopy()
Returns a new identical copy of thisIGeometry
.Computes the hodograph, the first parametric derivative, of thisBezierCurve
.Computes aBezierCurve
with a degree of one higher than thisBezierCurve
's degree but of the same shape.Point[]
getIntersections
(BezierCurve other) Returns thePoint
s of intersection of this and the given otherBezierCurve
.final Point[]
getIntersections
(ICurve curve) getOffset
(double distance) Returns aPolyBezier
that represents an approximation of the refined offset of thisBezierCurve
where cusps in the input curve are approximated by arc segments in the offset and local self-intersections in the offset are removed while global self-intersections and other singularities in the offset remain unprocessed.getOverlap
(BezierCurve other) Returns aBezierCurve
that represents the overlap of thisBezierCurve
and the given otherBezierCurve
.final ICurve[]
getP1()
getP2()
double
Returns the parameter value of thisBezierCurve
for the givenPoint
.getPoint
(int i) Returns the ith controlPoint
of thisBezierCurve
.Point[]
Returns the controlPoint
s of thisBezierCurve
.getProjection
(Point reference) getRotatedCCW
(Angle angle) getRotatedCCW
(Angle angle, double cx, double cy) getRotatedCCW
(Angle angle, Point center) getRotatedCW
(Angle angle) getRotatedCW
(Angle angle, double cx, double cy) getRotatedCW
(Angle angle, Point center) getScaled
(double factor) Scales a copy of the calling object by the given factor relative to its centerPoint
.getScaled
(double fx, double fy) Scales a copy of the calling object by the given factors relative to its centerPoint
.getScaled
(double factor, double cx, double cy) Scales a copy of the calling object by the given factor relative to the given centerPoint
(cx, cy).getScaled
(double fx, double fy, double cx, double cy) Scales a copy of the calling object by the given factors relative to the given centerPoint
(cx, cy).Scales a copy of the calling object by the given factors relative to the given centerPoint
.Scales a copy of the calling object by the given factor relative to the given centerPoint
.getTranslated
(double dx, double dy) Translates a copy of this object by the given values in x and y direction.Translates a copy of this object by the givenPoint
.double
getX1()
Returns the startPoint
's x coordinate.double
getX2()
Returns the endPoint
's x coordinate.double
getY1()
Returns the startPoint
's y coordinate.double
getY2()
Returns the endPoint
's y coordinate.final int
hashCode()
boolean
intersects
(ICurve c) boolean
overlaps
(BezierCurve other) Checks if thisBezierCurve
and the given otherBezierCurve
overlap, i.e. an infinite set of intersectionPoint
s exists.final boolean
Directly rotates thisBezierCurve
counter-clockwise (CCW) around its centerPoint
by the givenAngle
.Directly rotates thisBezierCurve
counter-clockwise (CCW) around thePoint
specified by the given x and y coordinate values by the givenAngle
.Directly rotates thisBezierCurve
counter-clockwise (CCW) around the givenPoint
by the givenAngle
.Directly rotates thisBezierCurve
clockwise (CW) around thePoint
specified by the given x and y coordinate values by the givenAngle
.scale
(double factor) Scales the calling object by the given factor relative to its centerPoint
.scale
(double fx, double fy) Scales the calling object by the given factors relative to the given centerPoint
.scale
(double factor, double cx, double cy) Scales the calling object by the given factor relative to the given centerPoint
(cx, cy).scale
(double fx, double fy, double cx, double cy) Scales the calling object by the given factors relative to the given centerPoint
(cx, cy).Scales the calling object by the given factors relative to the given centerPoint
.Scales the calling object by the given factor relative to the given centerPoint
.Sets the ith controlPoint
of thisBezierCurve
.split
(double t) Subdivides thisBezierCurve
at the given parameter value t into two newBezierCurve
s.toBezier()
Computes a list ofBezierCurve
s that approximate theICurve
.toCubic()
Returns a hard approximation of thisBezierCurve
as aCubicCurve
.toLine()
Returns a hard approximation of thisBezierCurve
as aLine
.Line[]
toLineStrip
(double lineSimilarity) Computes an approximation of thisBezierCurve
by a strip ofLine
s.Line[]
toLineStrip
(double lineSimilarity, org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval) Computes an approximation of thisBezierCurve
by a strip ofLine
s.toPath()
Point[]
toPoints
(org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval) Returns a hard approximation of thisBezierCurve
as aQuadraticCurve
.toString()
boolean
translate
(double dx, double dy) Translates the object by the given values in x and y direction.Translates the object by the givenPoint
.
-
Constructor Details
-
BezierCurve
Constructs a newBezierCurve
from the givenCubicCurve
.- Parameters:
c
- theCubicCurve
of which the newBezierCurve
is constructed from
-
BezierCurve
public BezierCurve(double... controlPoints) Constructs a newBezierCurve
from the given controlPoint
coordinates. The coordinates are expected to be in x, y order, i.e. x1, y1, x2, y2, x3, y3, ...- Parameters:
controlPoints
- the controlPoint
coordinates of the newBezierCurve
in x, y order
-
BezierCurve
Constructs a newBezierCurve
from the given controlPoint
s.- Parameters:
controlPoints
- the controlPoint
s of the newBezierCurve
-
BezierCurve
Constructs a newBezierCurve
from the givenQuadraticCurve
.- Parameters:
c
- theQuadraticCurve
of which the newBezierCurve
is constructed from
-
-
Method Details
-
contains
Tests if this
BezierCurve
contains the given otherBezierCurve
.The other
BezierCurve
is regarded to be contained by thisBezierCurve
if its start and endPoint
lie on thisBezierCurve
and an overlapping segment of the two curves can be detected.- Parameters:
o
- theBezierCurve
that is checked to be contained by thisBezierCurve
- Returns:
true
if the givenBezierCurve
is contained by thisBezierCurve
, otherwisefalse
-
contains
Description copied from interface:IGeometry
-
equals
-
get
Computes thePoint
on thisBezierCurve
at parameter value t, which is expected to lie in the parameterBezierCurve.Interval
[0;1]
.- Parameters:
t
- the parameter value for which thisBezierCurve
is evaluated- Returns:
- the
Point
on thisBezierCurve
at the given parameter value
-
getBounds
Description copied from interface:IGeometry
-
getClipped
- Parameters:
s
- the lower limit of the parameterBezierCurve.Interval
which is clipped out of thisBezierCurve
e
- the upper limit of the parameterBezierCurve.Interval
which is clipped out of thisBezierCurve
- Returns:
- a new
BezierCurve
representing thisBezierCurve
on theBezierCurve.Interval
[s;e]
-
getControlBounds
- Returns:
- a
Rectangle
representing the bounds of the controlPolygon
of thisBezierCurve
-
getCopy
Description copied from interface:IGeometry
Returns a new identical copy of thisIGeometry
. -
getDerivative
Computes the hodograph, the first parametric derivative, of thisBezierCurve
.- Returns:
- the hodograph of this
BezierCurve
-
getElevated
Computes aBezierCurve
with a degree of one higher than thisBezierCurve
's degree but of the same shape.- Returns:
- a
BezierCurve
of the same shape as thisBezierCurve
but with one more controlPoint
-
getIntersections
Returns thePoint
s of intersection of this and the given otherBezierCurve
.- Parameters:
other
- theBezierCurve
which is searched forPoint
s of intersection with thisBezierCurve
- Returns:
- the
Point
s of intersection of thisBezierCurve
and the given otherBezierCurve
-
getIntersections
Description copied from interface:ICurve
- Specified by:
getIntersections
in interfaceICurve
- Parameters:
curve
- TheICurve
to compute intersection points with.- Returns:
- The points of intersection.
-
getOffset
Returns aPolyBezier
that represents an approximation of the refined offset of thisBezierCurve
where cusps in the input curve are approximated by arc segments in the offset and local self-intersections in the offset are removed while global self-intersections and other singularities in the offset remain unprocessed.- Parameters:
distance
- The signed distance for which to compute a refined offset approximation.- Returns:
- A
PolyBezier
representing the refined offset of thisBezierCurve
for the given distance.
-
getOverlap
Returns a
BezierCurve
that represents the overlap of thisBezierCurve
and the given otherBezierCurve
. If no overlap exists,null
is returned. An overlap is identified by an infinite number of intersection points.- Parameters:
other
- TheBezierCurve
to which an overlap is computed.- Returns:
- a
BezierCurve
representing the overlap of this and the given otherBezierCurve
if an overlap exists, otherwisenull
-
getOverlaps
Description copied from interface:ICurve
- Specified by:
getOverlaps
in interfaceICurve
- Parameters:
c
- The curve to compute overlaps with.- Returns:
- The segments where both curves overlap.
-
getP1
Description copied from interface:ICurve
-
getP2
Description copied from interface:ICurve
-
getParameterAt
Returns the parameter value of thisBezierCurve
for the givenPoint
. If the givenPoint
is not on thisBezierCurve
anIllegalArgumentException
is thrown.- Parameters:
p
- thePoint
for which the parameter value on thisBezierCurve
is to be found- Returns:
- the corresponding parameter value of the given
Point
on thisBezierCurve
-
getPoint
Returns the ith controlPoint
of thisBezierCurve
. The startPoint
is at index0
, the first handle-Point
is at index1
, etc.- Parameters:
i
- the index of the controlPoint
of thisBezierCurve
to return- Returns:
- the ith control
Point
of thisBezierCurve
-
getPoints
Returns the controlPoint
s of thisBezierCurve
.- Returns:
- the control
Point
s of thisBezierCurve
-
getProjection
Description copied from interface:ICurve
Returns a projection of the given referencePoint
onto thisICurve
, i.e. aPoint
on thisICurve
that is closest to the given referencePoint
. Note, that- Specified by:
getProjection
in interfaceICurve
- Parameters:
reference
- The referencePoint
for which to return the projection.- Returns:
- The projection of the given reference
Point
onto thisICurve
.
-
getRotatedCCW
Description copied from interface:IRotatable
Rotates the calling object by specifiedAngle
counter-clock-wise (CCW) around its centerPoint
. Does not necessarily return an object of the same type.- Specified by:
getRotatedCCW
in interfaceIRotatable<BezierCurve>
- Parameters:
angle
- rotationAngle
- Returns:
- an
IGeometry
representing the result of the rotation
-
getRotatedCCW
Description copied from interface:IRotatable
Rotates the calling object by the specifiedAngle
counter-clock-wise (CCW) around the specified centerPoint
(cx, cy). Does not necessarily return an object of the same type.- Specified by:
getRotatedCCW
in interfaceIRotatable<BezierCurve>
- Parameters:
angle
- rotationAngle
cx
- x-coordinate of the relativePoint
for the rotationcy
- y-coordinate of the relativePoint
for the rotation- Returns:
- an
IGeometry
representing the result of the rotation
-
getRotatedCCW
Description copied from interface:IRotatable
Rotates the calling object by the specifiedAngle
counter-clock-wise (CCW) around the specified centerPoint
. Does not necessarily return an object of the same type.- Specified by:
getRotatedCCW
in interfaceIRotatable<BezierCurve>
- Parameters:
angle
- rotationAngle
center
- relativePoint
for the rotation- Returns:
- an
IGeometry
representing the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatable
Rotates the calling object by specifiedAngle
clock-wise (CW) around its centerPoint
. Does not necessarily return an object of the same type.- Specified by:
getRotatedCW
in interfaceIRotatable<BezierCurve>
- Parameters:
angle
- rotationAngle
- Returns:
- an
IGeometry
representing the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatable
Rotates the calling object by the specifiedAngle
clock-wise (CW) around the specified centerPoint
(cx, cy). Does not necessarily return an object of the same type.- Specified by:
getRotatedCW
in interfaceIRotatable<BezierCurve>
- Parameters:
angle
- rotationAngle
cx
- x-coordinate of the relativePoint
for the rotationcy
- y-coordinate of the relativePoint
for the rotation- Returns:
- an
IGeometry
representing the result of the rotation
-
getRotatedCW
Description copied from interface:IRotatable
Rotates the calling object by the specifiedAngle
clock-wise (CW) around the specified centerPoint
. Does not necessarily return an object of the same type.- Specified by:
getRotatedCW
in interfaceIRotatable<BezierCurve>
- Parameters:
angle
- rotationAngle
center
- relativePoint
for the rotation- Returns:
- an
IGeometry
representing the result of the rotation
-
getScaled
Description copied from interface:IScalable
Scales a copy of the calling object by the given factor relative to its centerPoint
.- Specified by:
getScaled
in interfaceIScalable<BezierCurve>
- Parameters:
factor
- scale-factor- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalable
Scales a copy of the calling object by the given factors relative to its centerPoint
.- Specified by:
getScaled
in interfaceIScalable<BezierCurve>
- Parameters:
fx
- x-scale-factorfy
- y-scale-factor- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalable
Scales a copy of the calling object by the given factor relative to the given centerPoint
(cx, cy).- Specified by:
getScaled
in interfaceIScalable<BezierCurve>
- Parameters:
factor
- scale-factorcx
- x-coordinate of the relativePoint
for the scalingcy
- y-coordinate of the relativePoint
for the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalable
Scales a copy of the calling object by the given factors relative to the given centerPoint
(cx, cy).- Specified by:
getScaled
in interfaceIScalable<BezierCurve>
- Parameters:
fx
- x-scale-factorfy
- y-scale-factorcx
- x-coordinate of the relativePoint
for the scalingcy
- y-coordinate of the relativePoint
for the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalable
Scales a copy of the calling object by the given factors relative to the given centerPoint
.- Specified by:
getScaled
in interfaceIScalable<BezierCurve>
- Parameters:
fx
- x-scale-factorfy
- y-scale-factorcenter
- relativePoint
for the scaling- Returns:
- the new, scaled object
-
getScaled
Description copied from interface:IScalable
Scales a copy of the calling object by the given factor relative to the given centerPoint
.- Specified by:
getScaled
in interfaceIScalable<BezierCurve>
- Parameters:
factor
- scale-factorcenter
- relativePoint
for the scaling- Returns:
- the new, scaled object
-
getTransformed
Default implementation returning a transformedPath
representation of thisIGeometry
. Subclasses may override this method to return a more specific representation.- Specified by:
getTransformed
in interfaceIGeometry
- Parameters:
t
- TheAffineTransform
to be applied- Returns:
- a transformed
Path
representation of thisIGeometry
- See Also:
-
getTranslated
Description copied from interface:ITranslatable
Translates a copy of this object by the given values in x and y direction.- Specified by:
getTranslated
in interfaceITranslatable<BezierCurve>
- Parameters:
dx
- x-translationdy
- y-translation- Returns:
- a new, translated object
-
getTranslated
Description copied from interface:ITranslatable
Translates a copy of this object by the givenPoint
.- Specified by:
getTranslated
in interfaceITranslatable<BezierCurve>
- Parameters:
d
- translationPoint
- Returns:
- a new, translated object
-
getX1
public double getX1()Description copied from interface:ICurve
Returns the startPoint
's x coordinate. -
getX2
public double getX2()Description copied from interface:ICurve
Returns the endPoint
's x coordinate. -
getY1
public double getY1()Description copied from interface:ICurve
Returns the startPoint
's y coordinate. -
getY2
public double getY2()Description copied from interface:ICurve
Returns the endPoint
's y coordinate. -
intersects
Description copied from interface:ICurve
Tests if thisICurve
and the givenICurve
intersect, i.e. whether a final set of intersection points exists. Two curves intersect if they touch (seeIGeometry.touches(IGeometry)
) but do not overlap (seeICurve.overlaps(ICurve)
).- Specified by:
intersects
in interfaceICurve
- Parameters:
c
- TheICurve
to test for intersections.- Returns:
true
if they intersect,false
otherwise
-
overlaps
Checks if thisBezierCurve
and the given otherBezierCurve
overlap, i.e. an infinite set of intersectionPoint
s exists.- Parameters:
other
- theBezierCurve
to check for an overlapping segment with thisBezierCurve
- Returns:
true
if this and the given otherBezierCurve
overlap, otherwisefalse
-
overlaps
Description copied from interface:ICurve
Tests if thisICurve
and the givenICurve
overlap, i.e. whether an infinite set of intersection points exists. Two curves overlap if they touch (seeIGeometry.touches(IGeometry)
) but not intersect (seeICurve.intersects(ICurve)
). -
rotateCCW
Directly rotates thisBezierCurve
counter-clockwise (CCW) around its centerPoint
by the givenAngle
. Direct adaptation means, thatthis
BezierCurve
is modified in-place.- Parameters:
angle
- the rotationAngle
- Returns:
this
for convenience
-
rotateCCW
Directly rotates thisBezierCurve
counter-clockwise (CCW) around thePoint
specified by the given x and y coordinate values by the givenAngle
. Direct adaptation means, thatthis
BezierCurve
is modified in-place. -
rotateCCW
Directly rotates thisBezierCurve
counter-clockwise (CCW) around the givenPoint
by the givenAngle
. Direct adaptation means, thatthis
BezierCurve
is modified in-place. -
rotateCW
Directly rotates thisBezierCurve
clockwise (CW) around its centerPoint
by the givenAngle
. Direct adaptation means, thatthis
BezierCurve
is modified in-place.- Parameters:
angle
- the rotationAngle
- Returns:
this
for convenience
-
rotateCW
Directly rotates thisBezierCurve
clockwise (CW) around thePoint
specified by the given x and y coordinate values by the givenAngle
. Direct adaptation means, thatthis
BezierCurve
is modified in-place. -
rotateCW
Directly rotates thisBezierCurve
clockwise (CW) around the givenPoint
by the givenAngle
. Direct adaptation means, thatthis
BezierCurve
is modified in-place. -
scale
Description copied from interface:IScalable
Scales the calling object by the given factor relative to its centerPoint
.- Specified by:
scale
in interfaceIScalable<BezierCurve>
- Parameters:
factor
- scale-factor- Returns:
this
for convenience
-
scale
Description copied from interface:IScalable
Scales the calling object by the given factors relative to the given centerPoint
.- Specified by:
scale
in interfaceIScalable<BezierCurve>
- Parameters:
fx
- x-scale-factorfy
- y-scale-factor- Returns:
this
for convenience
-
scale
Description copied from interface:IScalable
Scales the calling object by the given factor relative to the given centerPoint
(cx, cy).- Specified by:
scale
in interfaceIScalable<BezierCurve>
- Parameters:
factor
- scale-factorcx
- x-coordinate of the relativePoint
for the scalingcy
- y-coordinate of the relativePoint
for the scaling- Returns:
this
for convenience
-
scale
Description copied from interface:IScalable
Scales the calling object by the given factors relative to the given centerPoint
(cx, cy).- Specified by:
scale
in interfaceIScalable<BezierCurve>
- Parameters:
fx
- x-scale-factorfy
- y-scale-factorcx
- x-coordinate of the relativePoint
for the scalingcy
- y-coordinate of the relativePoint
for the scaling- Returns:
this
for convenience
-
scale
Description copied from interface:IScalable
Scales the calling object by the given factors relative to the given centerPoint
.- Specified by:
scale
in interfaceIScalable<BezierCurve>
- Parameters:
fx
- x-scale-factorfy
- y-scale-factorcenter
- relativePoint
for the scaling- Returns:
this
for convenience
-
scale
Description copied from interface:IScalable
Scales the calling object by the given factor relative to the given centerPoint
.- Specified by:
scale
in interfaceIScalable<BezierCurve>
- Parameters:
factor
- scale-factorcenter
- relativePoint
for the scaling- Returns:
this
for convenience
-
setP1
- Parameters:
p1
- the new startPoint
of thisBezierCurve
- Returns:
this
for convenience
-
setP2
- Parameters:
p2
- the new endPoint
of thisBezierCurve
- Returns:
this
for convenience
-
setPoint
Sets the ith controlPoint
of thisBezierCurve
. The startPoint
is at index0
, the first handle-Point
is at index1
, etc.- Parameters:
i
- the index of the controlPoint
of thisBezierCurve
to setp
- the new controlPoint
at the given index- Returns:
this
for convenience
-
split
Subdivides thisBezierCurve
at the given parameter value t into two newBezierCurve
s. The first one is theBezierCurve
over the parameterBezierCurve.Interval
[0;t]
and the second one is theBezierCurve
over the parameterBezierCurve.Interval
[t;1]
.- Parameters:
t
- the parameter value at which thisBezierCurve
is subdivided- Returns:
- an array of two
BezierCurve
s, the left ([0;t]
) and the right ([t;1]
)
-
toBezier
Description copied from interface:ICurve
Computes a list ofBezierCurve
s that approximate theICurve
. For example, aLine
or aBezierCurve
in general could return a list with the curve itself as its only element. But anEllipse
or anArc
may return a list of consecutiveBezierCurve
s which approximate theICurve
.- Specified by:
toBezier
in interfaceICurve
- Returns:
- a list of
BezierCurve
s that approximate theICurve
-
toCubic
Returns a hard approximation of thisBezierCurve
as aCubicCurve
. The newCubicCurve
is constructed from the startPoint
, the first two handlePoint
s and the endPoint
of thisBezierCurve
. If thisBezierCurve
is not of degree four or higher, i.e. it does not have four or more controlPoint
s (including start and endPoint
),null
is returned.- Returns:
- a new
CubicCurve
that is constructed from the startPoint
, the first two handlePoint
s and the endPoint
of thisBezierCurve
ornull
if thisBezierCurve
does not have at least four controlPoint
s
-
toLine
Returns a hard approximation of thisBezierCurve
as aLine
. TheLine
is constructed from the start and endPoint
of thisBezierCurve
.- Returns:
- a
Line
from the startPoint
to the endPoint
of thisBezierCurve
ornull
if thisBezierCurve
does only have one controlPoint
-
toLineStrip
Computes an approximation of thisBezierCurve
by a strip ofLine
s. For detailed information on how the approximation is computed, seetoLineStrip(double, Interval)
.- Parameters:
lineSimilarity
- the threshold for the sum of the distances of the controlPoint
s to the baseline (toLine()
) of thisBezierCurve
- Returns:
- an approximation of this
BezierCurve
by a strip ofLine
s - See Also:
-
toLineStrip
public Line[] toLineStrip(double lineSimilarity, org.eclipse.gef.geometry.planar.BezierCurve.Interval startInterval) Computes an approximation of this
BezierCurve
by a strip ofLine
s.The
BezierCurve
is recursively subdivided until it is "similar" to a straightLine
. The similarity check computes the sum of the distances of the controlPoint
s to the baseline (toLine()
) of thisBezierCurve
. If this sum is smaller than the given lineSimilarity, theBezierCurve
is assumed to be "similar" to a straight line.- Parameters:
lineSimilarity
- the threshold for the sum of the distances of the control points to the baseline of thisBezierCurve
startInterval
- theBezierCurve.Interval
of thisBezierCurve
that has to be approximated by a strip ofLine
s- Returns:
Line
segments approximating thisBezierCurve
-
toPath
- Specified by:
toPath
in interfaceIGeometry
- Returns:
- a
Path
approximating thisBezierCurve
usingLine
segments
-
toPoints
ComputesPoint
s on thisBezierCurve
over the givenBezierCurve.Interval
. Consecutive returnedPoint
s are required to beequal
to each other.- Parameters:
startInterval
- theBezierCurve.Interval
of thisBezierCurve
to calculatePoint
s for- Returns:
Point
s on thisBezierCurve
over the given parameterBezierCurve.Interval
where consecutivePoint
s areequal
to each other
-
toQuadratic
Returns a hard approximation of thisBezierCurve
as aQuadraticCurve
. The newQuadraticCurve
is constructed from the startPoint
, the first handlePoint
and the endPoint
of thisBezierCurve
. If thisBezierCurve
is not of degree three or higher, i.e. it does not have three or more controlPoint
s (including start and endPoint
),null
is returned.- Returns:
- a new
QuadraticCurve
that is constructed from the startPoint
, the first handlePoint
and the endPoint
of thisBezierCurve
ornull
if thisBezierCurve
does not have at least three controlPoint
s
-
toString
-
translate
Description copied from interface:ITranslatable
Translates the object by the given values in x and y direction.- Specified by:
translate
in interfaceITranslatable<BezierCurve>
- Parameters:
dx
- x-translationdy
- y-translation- Returns:
this
for convenience
-
translate
Description copied from interface:ITranslatable
Translates the object by the givenPoint
.- Specified by:
translate
in interfaceITranslatable<BezierCurve>
- Parameters:
d
- translationPoint
- Returns:
this
for convenience
-
clone
Overridden with public visibility as recommended withinCloneable
. -
hashCode
public final int hashCode() -
touches
Description copied from interface:IGeometry
-