math.geom2d.spline
Class BezierCurve2D

Package class diagram package BezierCurve2D
java.lang.Object
  extended by math.geom2d.curve.AbstractContinuousCurve2D
      extended by math.geom2d.curve.AbstractSmoothCurve2D
          extended by math.geom2d.spline.CubicBezierCurve2D
              extended by math.geom2d.spline.BezierCurve2D
All Implemented Interfaces:
Serializable, Cloneable, ContinuousCurve2D, Curve2D, SmoothCurve2D, ContinuousOrientedCurve2D, OrientedCurve2D, Shape2D

Deprecated. replaced by CubicBezierCurve2D (0.7.1)

@Deprecated
public class BezierCurve2D
extends CubicBezierCurve2D
implements Cloneable

An extension of the Bezier curve provided in java.awt.geom, with support for SmoothCurve2D and OrientedCurve2D.

Author:
Legland
See Also:
Serialized Form

Field Summary
 
Fields inherited from class math.geom2d.spline.CubicBezierCurve2D
ctrlx1, ctrlx2, ctrly1, ctrly2, x1, x2, y1, y2
 
Fields inherited from interface math.geom2d.Shape2D
ACCURACY
 
Constructor Summary
BezierCurve2D()
          Deprecated.  
BezierCurve2D(double[][] coefs)
          Deprecated. Build a new Bezier curve from its array of coefficients.
BezierCurve2D(double x1, double y1, double xctrl1, double yctrl1, double xctrl2, double yctrl2, double x2, double y2)
          Deprecated. Build a new Bezier curve of degree 3 by specifying position of extreme points and position of 2 control points.
BezierCurve2D(Point2D p1, Point2D ctrl1, Point2D ctrl2, Point2D p2)
          Deprecated. Build a new Bezier curve of degree 3 by specifying position of extreme points and position of 2 control points.
BezierCurve2D(Point2D p1, Vector2D v1, Point2D p2, Vector2D v2)
          Deprecated. Build a new Bezier curve of degree 3 by specifying position and tangent of first and last points.
 
Method Summary
 CurveSet2D<? extends BezierCurve2D> clip(Box2D box)
          Deprecated. Clip the Bezier curve by a box.
 BezierCurve2D clone()
          Deprecated. Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D.
 boolean equals(Object obj)
          Deprecated.  
 BezierCurve2D getReverseCurve()
          Deprecated. Returns the Bezier curve given by control points taken in reverse order.
 BezierCurve2D getSubCurve(double t0, double t1)
          Deprecated. Computes portion of BezierCurve.
 BezierCurve2D transform(AffineTransform2D trans)
          Deprecated. Returns the Bezier Curve transformed by the given AffineTransform2D.
 
Methods inherited from class math.geom2d.spline.CubicBezierCurve2D
appendPath, contains, contains, create, create, getBoundingBox, getControl1, getControl2, getCtrlP1, getCtrlP2, getCurvature, getDistance, getDistance, getFirstPoint, getGeneralPath, getIntersections, getLastPoint, getP1, getP2, getParametric, getPoint, getPosition, getSignedDistance, getSignedDistance, getT0, getT1, getTangent, getWindingAngle, isBounded, isClosed, isEmpty, isInside, project
 
Methods inherited from class math.geom2d.curve.AbstractSmoothCurve2D
getLeftTangent, getRightTangent, getSingularPoints, getSmoothPieces, isSingular
 
Methods inherited from class math.geom2d.curve.AbstractContinuousCurve2D
draw, getAsAWTShape, getAsPolyline, getContinuousCurves, wrapCurve
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface math.geom2d.curve.ContinuousCurve2D
getAsPolyline, getLeftTangent, getRightTangent, getSmoothPieces
 
Methods inherited from interface math.geom2d.curve.Curve2D
draw, getAsAWTShape, getContinuousCurves, getSingularPoints, isSingular
 

Constructor Detail

BezierCurve2D

public BezierCurve2D()
Deprecated. 

BezierCurve2D

public BezierCurve2D(double[][] coefs)
Deprecated. 
Build a new Bezier curve from its array of coefficients. The array must have size 2*4.

Parameters:
coefs - the coefficients of the BezierCurve2D.

BezierCurve2D

public BezierCurve2D(Point2D p1,
                     Point2D ctrl1,
                     Point2D ctrl2,
                     Point2D p2)
Deprecated. 
Build a new Bezier curve of degree 3 by specifying position of extreme points and position of 2 control points. The resulting curve is totally contained in the convex polygon formed by the 4 control points.

Parameters:
p1 - first point
ctrl1 - first control point
ctrl2 - second control point
p2 - last point

BezierCurve2D

public BezierCurve2D(Point2D p1,
                     Vector2D v1,
                     Point2D p2,
                     Vector2D v2)
Deprecated. 
Build a new Bezier curve of degree 3 by specifying position and tangent of first and last points.

Parameters:
p1 - first point
v1 - first tangent vector
p2 - position of last point
v2 - last tangent vector

BezierCurve2D

public BezierCurve2D(double x1,
                     double y1,
                     double xctrl1,
                     double yctrl1,
                     double xctrl2,
                     double yctrl2,
                     double x2,
                     double y2)
Deprecated. 
Build a new Bezier curve of degree 3 by specifying position of extreme points and position of 2 control points. The resulting curve is totally containe in the convex polygon formed by the 4 control points.

Method Detail

getReverseCurve

public BezierCurve2D getReverseCurve()
Deprecated. 
Returns the Bezier curve given by control points taken in reverse order.

Specified by:
getReverseCurve in interface ContinuousCurve2D
Specified by:
getReverseCurve in interface Curve2D
Specified by:
getReverseCurve in interface SmoothCurve2D
Specified by:
getReverseCurve in interface ContinuousOrientedCurve2D
Specified by:
getReverseCurve in interface OrientedCurve2D
Overrides:
getReverseCurve in class CubicBezierCurve2D

getSubCurve

public BezierCurve2D getSubCurve(double t0,
                                 double t1)
Deprecated. 
Computes portion of BezierCurve. If t1
Specified by:
getSubCurve in interface ContinuousCurve2D
Specified by:
getSubCurve in interface Curve2D
Specified by:
getSubCurve in interface SmoothCurve2D
Specified by:
getSubCurve in interface ContinuousOrientedCurve2D
Overrides:
getSubCurve in class CubicBezierCurve2D
Parameters:
t0 - position of the start of the sub-curve
t1 - position of the end of the sub-curve
Returns:
the portion of original curve comprised between t0 and t1.

clip

public CurveSet2D<? extends BezierCurve2D> clip(Box2D box)
Deprecated. 
Clip the Bezier curve by a box. REturn a set of BezierCurve2D.

Specified by:
clip in interface ContinuousCurve2D
Specified by:
clip in interface Curve2D
Specified by:
clip in interface SmoothCurve2D
Specified by:
clip in interface ContinuousOrientedCurve2D
Specified by:
clip in interface OrientedCurve2D
Specified by:
clip in interface Shape2D
Overrides:
clip in class CubicBezierCurve2D
Parameters:
box - the clipping box
Returns:
the clipped shape

transform

public BezierCurve2D transform(AffineTransform2D trans)
Deprecated. 
Returns the Bezier Curve transformed by the given AffineTransform2D. This is simply done by transforming control points of the curve.

Specified by:
transform in interface ContinuousCurve2D
Specified by:
transform in interface Curve2D
Specified by:
transform in interface SmoothCurve2D
Specified by:
transform in interface ContinuousOrientedCurve2D
Specified by:
transform in interface OrientedCurve2D
Specified by:
transform in interface Shape2D
Overrides:
transform in class CubicBezierCurve2D
Parameters:
trans - an affine transform
Returns:
the transformed shape

equals

public boolean equals(Object obj)
Deprecated. 
Overrides:
equals in class CubicBezierCurve2D

clone

public BezierCurve2D clone()
Deprecated. 
Description copied from interface: Curve2D
Overrides Object declaration to ensure Curve2D implementation are cloned as Curve2D.

Specified by:
clone in interface Curve2D
Overrides:
clone in class CubicBezierCurve2D
Returns:
the cloned curve


Copyright © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.