Bezier Curve
This is the BezierCurve class. This class handles the creation of Bezier curves, which are used as the basis of the path for the Path class. Bezier curves are parametric curves defined by a set of control points. So, they take in one input, t, that ranges from [0, 1] and that returns a point on the curve. Essentially, Bezier curves are a way of defining a parametric line easily. You can read more on Bezier curves here: https://en.wikipedia.org/wiki/Bézier_curve
Author
Anyi Lin - 10158 Scott's Bots
Aaron Yang - 10158 Scott's Bots
Harrison Womack - 10158 Scott's Bots
Inheritors
Constructors
Link copied to clipboard
This creates an empty BezierCurve.
This creates a new BezierCurve with an ArrayList of control points and generates the curve.
This creates a new Bezier curve with some specified control points and generates the curve.
This creates a new Bezier curve with some specified control points and generates the curve.
Functions
Link copied to clipboard
This approximates the length of the BezierCurve in APPROXIMATION_STEPS number of steps.
Link copied to clipboard
This generates the Bezier curve.
Link copied to clipboard
Because, for whatever reason, the second derivative returned by the getSecondDerivative(double t) method doesn't return the correct heading of the second derivative, this gets an approximate second derivative essentially using the limit method.
Link copied to clipboard
Returns the ArrayList of control points for this BezierCurve.
Link copied to clipboard
This returns the curvature of the Bezier curve at a specified t-value.
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
This returns the derivative on the BezierCurve that is specified by the parametric t value.
Link copied to clipboard
This returns the unit tangent Vector at the end of the BezierCurve.
Link copied to clipboard
Returns the first control point for this BezierCurve.
Link copied to clipboard
Returns the last control point for this BezierCurve.
Link copied to clipboard
Returns the second control point, or the one after the start, for this BezierCurve.
Link copied to clipboard
This returns the second derivative on the BezierCurve that is specified by the parametric t value.
Link copied to clipboard
Returns the second to last control point for this BezierCurve.
Link copied to clipboard
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
Returns the conversion factor of one unit of distance into t-value.