BezierLine

public class BezierLine extends BezierCurve

This is the BezierLine class. This class handles the creation of BezierLines, which is what I call Bezier curves with only two control points. The parent BezierCurve class cannot handle Bezier curves with less than three control points, so this class handles lines. 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 BezierLine(Point startPoint, Point endPoint)
This creates a new BezierLine with specified start and end Points.
public void BezierLine(Pose startPose, Pose endPose)
This creates a new BezierLine with specified start and end Points.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
public double approximateLength()
This gets the length of the BezierLine.
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 BezierLine.
Link copied to clipboard
public double getCurvature(double t)
This returns the curvature of the BezierLine, which is zero.
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 BezierLine as a Vector, which is a constant slope.
Link copied to clipboard
This returns the unit tangent Vector at the end of the BezierLine.
Link copied to clipboard
Returns the first control point for this BezierLine.
Link copied to clipboard
Returns the last control point for this BezierLine.
Link copied to clipboard
public Point getPoint(double t)
This returns the Point on the Bezier line 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 BezierLine.
Link copied to clipboard
public Vector getSecondDerivative(double t)
This returns the second derivative on the Bezier line, which is a zero Vector.
Link copied to clipboard
Returns the second to last control point for this BezierLine.
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 BezierLine.
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.