BezierPoint

public class BezierPoint extends BezierCurve

This is the BezierPoint class. This class handles the creation of BezierPoints, which is what I call Bezier curves with only one control point. The parent BezierCurve class cannot handle Bezier curves with less than three control points, so this class handles points. Additionally, it makes the calculations done on the fly a little less computationally expensive and more streamlined.

Author

Anyi Lin - 10158 Scott's Bots

Aaron Yang - 10158 Scott's Bots

Harrison Womack - 10158 Scott's Bots

Constructors

Link copied to clipboard
public void BezierPoint(Point point)
This creates a new BezierPoint with a specified Point.
public void BezierPoint(Pose pose)
This creates a new BezierPoint with a specified Point.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
public double approximateLength()
This gets the length of the BezierPoint.
Link copied to clipboard
public void generateBezierCurve()
This generates the Bezier curve.
Link copied to clipboard
This returns the zero Vector, but it's here so I can override the method in the BezierCurve class.
Link copied to clipboard
Returns the ArrayList of control points for this BezierPoint
Link copied to clipboard
public double getCurvature(double t)
This returns the curvature of the BezierPoint, which is zero since this is a Point.
Link copied to clipboard
This returns a 2D Array of doubles containing the x and y positions of points to draw on FTC Dashboard.
Link copied to clipboard
public Vector getDerivative(double t)
This returns the derivative on the BezierPoint, which is the zero Vector since this is a Point.
Link copied to clipboard
This supposedly returns the unit tangent Vector at the end of the path, but since there is no end tangent of a point, this returns a zero Vector instead.
Link copied to clipboard
Returns the first, and only, control point for this BezierPoint
Link copied to clipboard
Returns the last control point for this BezierPoint.
Link copied to clipboard
public Point getPoint(double t)
This returns the point on the BezierPoint that is specified by the parametric t value.
Link copied to clipboard
Returns the second control point, or the one after the start, for this BezierPoint.
Link copied to clipboard
public Vector getSecondDerivative(double t)
This returns the second derivative on the Bezier line, which is the zero Vector since this is a Point.
Link copied to clipboard
Returns the second to last control point for this BezierPoint.
Link copied to clipboard
public void initialize()
This handles most of the initialization of the BezierCurve that is called from the constructor.
Link copied to clipboard
This creates the Array that holds the Points to draw on the Dashboard.
Link copied to clipboard
public double length()
Returns the length of this BezierPoint, which is zero since Points don't have length.
Link copied to clipboard
public String pathType()
Returns the type of path.
Link copied to clipboard
public double UNIT_TO_TIME()
Returns the conversion factor of one unit of distance into t value.