Construct a quad curve using an explicitly given control point.
Construct a quad curve using an explicitly given control point.
the starting point
the control point
the ending point
Construct a quad curve where bend indicates the distance to the control point.
Construct a quad curve where bend indicates the distance to the control point.
the starting point
the ending point
the bend or curvature (1. => line length)
Construct a straight line (degenerate quad curve).
Construct a straight line (degenerate quad curve).
the starting point
the ending point
the starting point for the quad curve
the control point for the quad curve
the ending point for the quad curve
whether the quad curve is straight (i.e., a line)
Given a value for the trajectory parameter t (in [0.
Given a value for the trajectory parameter t (in [0., 1.]) calculate the point on the curve using the Quadratic Bezier equation. See http://en.wikipedia.org/wiki/Bézier_curve#Quadratic_curves
Show the flaw by printing the error message.
Show the flaw by printing the error message.
the method where the error occurred
the error message
Get the x-coordinate of the center of the line/curve.
Get the x-coordinate of the center of the line/curve.
Get the y-coordinate of the center of the line/curve.
Get the y-coordinate of the center of the line/curve.
Get the control point of the quad curve.
Get the first/start point of the quad curve, adjusted from top-left to center coordinates.
Get the first/start point of the quad curve, adjusted from top-left to center coordinates.
the width of object traversing the curve
the height of object traversing the curve
Get the first/start point of the quad curve.
Get the last/end point of the quad curve, adjusted from top-left to center coordinates.
Get the last/end point of the quad curve, adjusted from top-left to center coordinates.
the width of object traversing the curve
the height of object traversing the curve
Get the last/end point of the quad curve.
Are (x, y) and (xe, ye) essentially the same?
Return the length of this QCurve
Return the next point on the quad curve (one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height.
Return the next point on the quad curve (one step beyond current point) and adjust from top-left to center coordinates for the object traversing the curve based on its width and height. Return null if t > 1. (i.e., past end point).
the width of object traversing the curve
the height of object traversing the curve
Return the next point on the quad curve (one step beyond current point).
Return the next point on the quad curve (one step beyond current point). Return null if t > 1. (i.e., past end point).
the starting point for the quad curve
the ending point for the quad curve
the control point for the quad curve
Set (or reset) the location for the QCurve as a curve using an explicitly given control point.
Set (or reset) the location for the QCurve as a curve using an explicitly given control point.
the starting point
the control point
the ending point
Set (or reset) the location for the QCurve as a curve using bend to calculate the control point.
Set (or reset) the location for the QCurve as a curve using bend to calculate the control point.
the starting point
the ending point
the bend or curvature (1. => line-length)
Set (or reset) the location for the QCurve as a line.
Set (or reset) the location for the QCurve as a line.
the starting point
the ending point
Set the number of steps for tokens to take as move along the quad curve.
Set the trajectory (t) to a new value.
Set the trajectory (t) to a new value.
the new trajectory for the curve
whether the quad curve is straight (i.
whether the quad curve is straight (i.e., a line)
Show the start, control and end points of the the QCurve.
Show the start, control and end points of the the QCurve.
Return the current trajectory (t) of the curve.
The
QCurve
class enhances theQuadCurve.Double
class (from the java.awt.geom package) by allowing entities to move along such quadratic curves as well as lines. Although the curve could be developed as a quadratic function where 'y = ax2 + bx + c'. The following quadratic bezier formulation is used: p(t) = (x(t), y(t)) = [(1-t)2 * p1] + [2 * (1-t) * t * pc] + [t^2 * p2].the starting point for the quad curve
the control point for the quad curve
the ending point for the quad curve
whether the quad curve is straight (i.e., a line)