Class Arc
java.lang.Object
me.wobblyyyy.pathfinder.trajectory.Spline
me.wobblyyyy.pathfinder.trajectory.Arc
- All Implemented Interfaces:
Segment
public class Arc extends Spline
An
Arc is an abstraction of the Spline class designed to
simplify the process of creating arcs that behave in a reliable way. The
Arc class allows you to create simple arcs with a single control
point between the start and stop points.- Since:
- 0.3.0
- Author:
- Colin Robertson
-
Constructor Summary
Constructors Modifier Constructor Description privateArc(me.wobblyyyy.edt.Arrayable<HeadingPoint> points)Create a newSplinethat will hit each of the required points. -
Method Summary
Modifier and Type Method Description static Arcbend(HeadingPoint start, double bendDistance, HeadingPoint stop)Create anArcinstance by inserting a control point at the midpoint of the line between the start and stop points and applying a (X, Y) translational deviation to the newly-created point.Methods inherited from class me.wobblyyyy.pathfinder.trajectory.Spline
angleAt, end, interpolateFromX, interpolateFromY, maximum, minimum, start, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
Arc
Create a newSplinethat will hit each of the required points. Splines are created so that they hit each and every one of the target points, meaning that if you tell the robot to pass through (10, 10), the robot will pass through (10, 10) no matter what.- Parameters:
points- a container that contains each of the required points. Each and every one of these points will be passed through directly by the spline computational system, meaning that the robot will go exactly where you tell it to go.
-
-
Method Details
-
bend
Create anArcinstance by inserting a control point at the midpoint of the line between the start and stop points and applying a (X, Y) translational deviation to the newly-created point.- Parameters:
start- the start point of the arc.bendDistance- how far from the center of the start and stop points the arc will bend in a given direction.stop- the stop point of the arc.- Returns:
- an arc with the requested bend.
-