Package net.paulhertz.pixelaudio.curves

# Class PACurveMaker

java.lang.Object
net.paulhertz.pixelaudio.curves.PACurveMaker

public class PACurveMaker extends Object

PACurveMaker is a utility and storage class for interactive drawing and curve modeling and for drawing to on screen PApplets or off screen PGraphics. You can use it for data storage in interactive drawing applications, or implement your own storage with just the features you require. PACUrveMaker makes extensive use of PACurveUtility's static methods and provides a wide range of graphic objects and properties for dense point arrays, reduced point arrays, derived Bezier curves (weighted and not weighted), brushstroke Bezier shapes, brushstroke polygons, plus some basic timing data associated with drawing to the screen. You can use PACurveUtility for drawing all PACurveMaker data formats or you can use the built-in commands if you use PACurveMaker as a storage class.

PACurveMaker's factory methods takes as their principal argument an array of PVectors. The array is typically derived from a line drawn by dragging the mouse across the application window. This line is stored in `dragPoints`. When `reducePoints()` or `calculateDerivedPoints()` is called, `dragPoints` is reduced using the RDP algorithm and the result is stored in `rdpPoints`. `CalculateDerivedPoints()` passes the reduced points to `PACurveUtility.calculateCurve()` to create a Bezier path, `curveShape`, using PixelAudio library's `PABezShape` class. Finally, a brushstroke shape, `brushShape`, is created from the curve. An array of PVectors, `eventPoints`, is created from curveShape to facilitate timed event-staging along the curve. Another array of Pvectors, `brushPoly`, can be used to test points with `PABezShape.pointInPoly()`. The values of all other fields are up to the caller. In particular, you may want to set `timeStamp`, `timeOffset`, and the `dragTimes` array, if the timing of drawing events is of interest.

PACurveMaker works in stages. If you call any one of the `buildCurveMakerComplete()` factory methods, PACurveMaker will call `calculateDerivedPoints()` to create the objects listed in the previous paragraph for you. Otherwise, when you call the `buildCurveMaker()` factory methods, you will have the opportunity to set drawing properties and other fields yourself and then call `calculateDerivedPoints()`. After a call to `calculateDerivedPoints()`, `isReady()` will return true. You can also use lazy initialization to create PACurveMaker geometry as you need it. The fields for the various point and curve data objects are private: when you call a getter method such as `getCurveShape()`, it will create the curveShape if it has not yet been initialized. The same is true of rdpPoints, brushShape, eventPoints, curveShape and brushPoly.

Each of the geometric data objects--dragPoints, rdpPoints, curveShape, and brushShape--has method for drawing to the screen in a PApplet or drawing offscreen in a PGraphic. DragPoints and rdpPoints keep their drawing parameters (fill, stroke, weight) in PACurveMaker variables. PABezShapes like curveShape and brushShape can store drawing parameters internally.

There a several properties of PACurveMaker that can affect the appearance of curves. The value of `epsilon` determines how closely the reduced point set in `rdpPoints` matches the dense point set in `dragPoints`. Smaller values, down to 1.0, yield a reduced point set with more points and great precision. Some of the factory methods allow you to supply your own value for epsilon, which defaults to 8.0. Weighted curves and brushstrokes are variations on the smooth Bezier curves that PACurveMaker generates by default. In the default curves, the rate of change in curvature is the same on either side of a Bezier anchor point. The weighted curves use a value, bezierBias, to change the adjust the control points. The default bias value, PABezShape.LAMBDA, may provide a closer approximation to rdpPoints. Other values can create extreme curves. It's worth some experimentation. If you call setDrawWeighted(true) and then call calculateDerivedPoints(), curveShape and brushShape will be generated as weighted Bezier curves. There are several calls to generate weighted Bezier curves. They do not set local variables, but can be useful for exploring the variations created by different values of bezierBias. PACurveUtility can also create weighted curves.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `int`
  `activeBrushColor`
  Color for highlighted brush stroke, stored in brushShape
  `float`
  `bezierBias`
  A weight applied to calculations of the control points for Bezier curves
  `int`
  `brushColor`
  Color for simulated brushstroke fill and stroke, stored in brushShape
  `private ArrayList<processing.core.PVector>`
  `brushPoly`
  polygon representation of brushShape, for point testing, etc.
  `private PABezShape`
  `brushShape`
  A simulated brush stroke
  `float`
  `brushSize`
  The distance in pixels of the edges of the brush stroke from the central generating curve
  `float`
  `brushWeight`
  weight of stroke for brushStroke, set to 0 for no stroke
  `int`
  `curveColor`
  Color for Bezier curve derived from drawPoints, stored in bezPoints or weightedBezPoints
  `private PABezShape`
  `curveShape`
  An ArrayList of PABezShapes representing a continuous curved line
  `float`
  `curveWeight`
  weight of curved line curveShape
  `int`
  `dragColor`
  Color for lines dragged by the mouse, stored in allPoints
  `ArrayList<processing.core.PVector>`
  `dragPoints`
  List of all the points that need to be reduced
  `(package private) ArrayList<Integer>`
  `dragTimes`
  List of time data: first element is time in millis when event occurred, the remaining elements are offsets in millis from the first element
  `float`
  `dragWeight`
  weight of lines drawn between PVectors in allPoints
  `float`
  `epsilon`
  A parameter to control the amount of reduction in the RDP algorithm
  `private ArrayList<processing.core.PVector>`
  `eventPoints`
  List of points where events such as audio samples can be triggered
  `int`
  `eventPointsColor`
  color of eventPoints markers
  `float`
  `eventPointsSize`
  size of eventPoints markers
  `int`
  `eventSteps`
  number of steps along a polygonized curve, used to produce eventPoints from curveShape
  `boolean`
  `isDrawWeighted`
  boolean value that determines whether curve and brush shapes are weighted
  `private boolean`
  `isReady`
  Flag to indicate that allPoints, drawPoints, bezPoints, and brushShape have been initialized
  `int`
  `polySteps`
  number of steps along a polygonized curve, used to produce brushPoly
  `int`
  `rdpColor`
  Color for points reduced by RDP algorithm, stored in drawPoints
  `private ArrayList<Integer>`
  `rdpIndices`
  list of indices of points in dragPoints captured for rdpPoints
  `private ArrayList<processing.core.PVector>`
  `rdpPoints`
  The reduced points delivered by the RDP algorithm
  `float`
  `rdpWeight`
  weight of lines drawn between PVectors in drawPoints
  `int`
  `timeOffset`
  Time of mouseReleased event, in milliseconds elapsed since timeStamp
  `int`
  `timeStamp`
  Time when CurveMaker instance was initialized by mousePressed event, in milliseconds since application startup

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `private`
  `PACurveMaker(ArrayList<processing.core.PVector> points)`
  Constructor called by all factory methods, initializes dragPoints, rdpPoints and rdpIndices.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `brushDraw(processing.core.PApplet parent)`
  Draws the stored brushShape to a PApplet using local properties this.brushColor, this.brushColor, this.brushWeight.
  `void`
  `brushDraw(processing.core.PApplet parent, int brushColor, int strokeColor, float brushWeight)`
  Draws the stored brushShape to a PApplet using supplied fill color, stroke color, and weight.
  `void`
  `brushDraw(processing.core.PGraphics pg)`
  Draws the stored brushShape to an offscreen PGraphics using local properties this.brushColor, this.brushColor, this.brushWeight.
  `void`
  `brushDraw(processing.core.PGraphics pg, int brushColor, int strokeColor, float brushWeight)`
  Draws the stored brushShape to an offscreen PGraphics using supplied fill color, stroke color, and weight.
  `void`
  `brushDrawDirect(processing.core.PApplet parent)`
  Draws the stored brush shape to a PApplet using its properties as a PABezShape.
  `void`
  `brushDrawDirect(processing.core.PGraphics pg)`
  Draws the stored brush shape to an offscreen PGraphics using its properties as a PABezShape.
  `static PACurveMaker`
  `buildCurveMaker(ArrayList<processing.core.PVector> points)`
  Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables.
  `static PACurveMaker`
  `buildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon)`
  `static PACurveMaker`
  `buildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor)`
  Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables.
  `static PACurveMaker`
  `buildCurveMakerComplete(ArrayList<processing.core.PVector> points)`
  Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.
  `static PACurveMaker`
  `buildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon)`
  Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.
  `static PACurveMaker`
  `buildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor)`
  Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.
  `void`
  `calculateDerivedPoints()`
  Calculates rdpPoints, curveShape, eventPoints, brushShape and brushPoly.
  `void`
  `curveDraw(processing.core.PApplet parent)`
  Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight.
  `void`
  `curveDraw(processing.core.PGraphics pg)`
  Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight.
  `void`
  `curveDrawDirect(processing.core.PApplet parent)`
  Draws a Bezier curve using local drawing properties of curveShape.
  `void`
  `curveDrawDirect(processing.core.PGraphics pg)`
  Draws a Bezier curve using local drawing properties of this.curveShape as a PABezShape.
  `void`
  `dragPointsDraw(processing.core.PApplet parent)`
  Draws a line using the PVector data in allPoints and the current values of this.dragColor and this.dragWeight.
  `void`
  `dragPointsDraw(processing.core.PApplet parent, int dragColor, float dragWeight)`
  Draws a line using the PVector data in dragPoints and a supplied color.
  `void`
  `dragPointsDraw(processing.core.PGraphics pg)`
  Draws dragPoints to a PGraphics using local color and weight, this.dragColor and this.dragWeight.
  `void`
  `dragPointsDraw(processing.core.PGraphics pg, int dragColor, float dragWeight)`
  Draws dragPoints to a PGraphics using supplied color and weight.
  `void`
  `eventPointsDraw(processing.core.PApplet parent)`
  Draws this.eventPoints to a PApplet as circles using local properties this.eventPointsColor and this.eventPointsSize.
  `void`
  `eventPointsDraw(processing.core.PApplet parent, int eventPointsColor, float eventPointsSize)`
  Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsColor and eventPointsSize.
  `void`
  `eventPointsDraw(processing.core.PApplet parent, int eventSteps, int eventPointsColor, float eventPointsSize)`
  Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize.
  `void`
  `eventPointsDraw(processing.core.PGraphics pg)`
  Draws this.eventPoints to an offscreen PGraphics as circles using local properties this.eventPointsColor and this.eventPointsSize.
  `void`
  `eventPointsDraw(processing.core.PGraphics pg, int eventPointsColor, float eventPointsSize)`
  Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsColor and eventPointsSize.
  `void`
  `eventPointsDraw(processing.core.PGraphics pg, int eventSteps, int eventPointsColor, float eventPointsSize)`
  Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize.
  `int`
  `getActiveBrushColor()`
  `float`
  `getBezierBias()`
  `int`
  `getBrushColor()`
  `ArrayList<processing.core.PVector>`
  `getBrushPoly()`
  `PABezShape`
  `getBrushShape()`
  `float`
  `getBrushSize()`
  `float`
  `getBrushWeight()`
  `int`
  `getCurveColor()`
  `PABezShape`
  `getCurveShape()`
  `float`
  `getCurveWeight()`
  `int`
  `getDragColor()`
  `ArrayList<processing.core.PVector>`
  `getDragPoints()`
  `ArrayList<Integer>`
  `getDragTimes()`
  `int[]`
  `getDragTimesAsInts()`
  `float`
  `getDragWeight()`
  `float`
  `getEpsilon()`
  `ArrayList<processing.core.PVector>`
  `getEventPoints()`
  `ArrayList<processing.core.PVector>`
  `getEventPoints(int eventSteps)`
  `int`
  `getEventPointsColor()`
  `float`
  `getEventPointsSize()`
  `int`
  `getEventSteps()`
  `int`
  `getPolySteps()`
  `int`
  `getRdpColor()`
  `ArrayList<Integer>`
  `getRdpIndices()`
  `int[]`
  `getRdpIndicesAsInts()`
  `ArrayList<processing.core.PVector>`
  `getRdpPoints()`
  `float`
  `getRdpWeight()`
  `int`
  `getTimeOffset()`
  `int`
  `getTimeStamp()`
  `PABezShape`
  `getWeightedBrushShape()`
  `PABezShape`
  `getWeightedBrushShape(float brushSize, float bias)`
  `PABezShape`
  `getWeightedCurveShape()`
  `PABezShape`
  `getWeightedCurveShape(float bias)`
  Calculates a PABezSHape with distances between control points and anchor points adjusted by bezierBias.
  `boolean`
  `isDrawWeighted()`
  `boolean`
  `isReady()`
  `void`
  `reducedPointsDraw(processing.core.PApplet parent)`
  Draws a line using the PVector data in rdpPoints and the current values of this.rdpColor and this.rdpWeight.
  `void`
  `reducedPointsDraw(processing.core.PApplet parent, int rdpColor, float drawWeight)`
  Draws a line using the PVector data in drawPoints, the reduced point set derived from allPoints.
  `void`
  `reducedPointsDraw(processing.core.PGraphics pg)`
  Draws drawPoints to a PGraphics using current values of this.rdpColor and this.rdpWeight.
  `void`
  `reducedPointsDraw(processing.core.PGraphics pg, int rdpColor, float rdpWeight)`
  Draws rdpPoints to a PGraphics using supplied color and weight.
  `void`
  `reducePoints(float epsilon)`
  Takes the list of points in allPoints and generates a reduced list in drawPoints.
  `void`
  `setActiveBrushColor(int activeBrushColor)`
  `void`
  `setBezierBias(float bias)`
  `void`
  `setBrushColor(int brushColor)`
  `void`
  `setBrushShape(PABezShape brushShape)`
  `void`
  `setBrushSize(float brushSize)`
  `void`
  `setBrushWeight(float brushWeight)`
  `void`
  `setCurveColor(int curveColor)`
  `void`
  `setCurveShape(PABezShape curveShape)`
  `void`
  `setCurveWeight(float curveWeight)`
  `void`
  `setDragColor(int dragColor)`
  `void`
  `setDragPoints(ArrayList<processing.core.PVector> dragPoints)`
  If you change the value of dragPoints, immediately call calculateDerivedPoints() to refresh all drawing objects.
  `void`
  `setDragTimes(ArrayList<Integer> dragTimes)`
  `void`
  `setDragWeight(float dragWeight)`
  `void`
  `setDrawingProperties(int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor)`
  Sets various properties used for drawing PACurveMaker graphics.
  `void`
  `setDrawWeighted(boolean isDrawWeighted)`
  `void`
  `setEpsilon(float epsilon)`
  `void`
  `setEventPoints(ArrayList<processing.core.PVector> eventPoints)`
  `void`
  `setEventPointsColor(int eventPointsColor)`
  `void`
  `setEventPointsSize(float eventPointsSize)`
  `void`
  `setEventSteps(int eventSteps)`
  `void`
  `setPolySteps(int polySteps)`
  `void`
  `setRdpColor(int rdpColor)`
  `void`
  `setRdpIndices(ArrayList<Integer> rdpIndices)`
  Sets rdpIndices, generally not something you want to do.
  `void`
  `setRdpPoints(ArrayList<processing.core.PVector> rdpPoints)`
  Sets rdpPoints, generally not something you want to do: let reducePoints() or calculateDerivedPoints() derive rdpPoints from dragPoints instead.
  `void`
  `setRdpWeight(float rdpWeight)`
  `void`
  `setTimeOffset(int timeOffset)`
  `void`
  `setTimeStamp(int timeStamp)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### dragPoints

    public ArrayList<processing.core.PVector> dragPoints
    List of all the points that need to be reduced

  - ### rdpPoints

    private ArrayList<processing.core.PVector> rdpPoints
    The reduced points delivered by the RDP algorithm

  - ### rdpIndices

    private ArrayList<Integer> rdpIndices
    list of indices of points in dragPoints captured for rdpPoints

  - ### curveShape

    private PABezShape curveShape
    An ArrayList of PABezShapes representing a continuous curved line

  - ### brushShape

    private PABezShape brushShape
    A simulated brush stroke

  - ### brushPoly

    private ArrayList<processing.core.PVector> brushPoly
    polygon representation of brushShape, for point testing, etc.

  - ### polySteps

    public int polySteps
    number of steps along a polygonized curve, used to produce brushPoly

  - ### brushSize

    public float brushSize
    The distance in pixels of the edges of the brush stroke from the central generating curve

  - ### epsilon

    public float epsilon
    A parameter to control the amount of reduction in the RDP algorithm

  - ### isDrawWeighted

    public boolean isDrawWeighted
    boolean value that determines whether curve and brush shapes are weighted

  - ### bezierBias

    public float bezierBias
    A weight applied to calculations of the control points for Bezier curves

  - ### dragColor

    public int dragColor
    Color for lines dragged by the mouse, stored in allPoints

  - ### dragWeight

    public float dragWeight
    weight of lines drawn between PVectors in allPoints

  - ### rdpColor

    public int rdpColor
    Color for points reduced by RDP algorithm, stored in drawPoints

  - ### rdpWeight

    public float rdpWeight
    weight of lines drawn between PVectors in drawPoints

  - ### curveColor

    public int curveColor
    Color for Bezier curve derived from drawPoints, stored in bezPoints or weightedBezPoints

  - ### curveWeight

    public float curveWeight
    weight of curved line curveShape

  - ### brushColor

    public int brushColor
    Color for simulated brushstroke fill and stroke, stored in brushShape

  - ### activeBrushColor

    public int activeBrushColor
    Color for highlighted brush stroke, stored in brushShape

  - ### brushWeight

    public float brushWeight
    weight of stroke for brushStroke, set to 0 for no stroke

  - ### eventPoints

    private ArrayList<processing.core.PVector> eventPoints
    List of points where events such as audio samples can be triggered

  - ### eventSteps

    public int eventSteps
    number of steps along a polygonized curve, used to produce eventPoints from curveShape

  - ### eventPointsColor

    public int eventPointsColor
    color of eventPoints markers

  - ### eventPointsSize

    public float eventPointsSize
    size of eventPoints markers

  - ### isReady

    private boolean isReady
    Flag to indicate that allPoints, drawPoints, bezPoints, and brushShape have been initialized

  - ### timeStamp

    public int timeStamp
    Time when CurveMaker instance was initialized by mousePressed event, in milliseconds since application startup

  - ### timeOffset

    public int timeOffset
    Time of mouseReleased event, in milliseconds elapsed since timeStamp

  - ### dragTimes

    ArrayList<Integer> dragTimes
    List of time data: first element is time in millis when event occurred, the remaining elements are offsets in millis from the first element

- ## Constructor Details

  - ### PACurveMaker

    private PACurveMaker(ArrayList<processing.core.PVector> points)
    Constructor called by all factory methods, initializes dragPoints, rdpPoints and rdpIndices.
    Parameters:
      `points` - the array of points to be reduced, stored in dragPoints

- ## Method Details

  - ### setDrawingProperties

    public void setDrawingProperties(int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor)
    Sets various properties used for drawing PACurveMaker graphics.
    Parameters:
      `dragColor` -
      `dragWeight` -
      `rdpColor` -
      `rdpWeight` -
      `curveColor` -
      `curveWeight` -
      `brushColor` -
      `brushWeight` -
      `activeBrushColor` -

  - ### buildCurveMaker

    public static PACurveMaker buildCurveMaker(ArrayList<processing.core.PVector> points)
    Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables.
    Parameters:
      `points` - a dense point set
    Returns:
      a partially initialized PACurveMaker instance, requires a later call to calculateDeriverPoints()

  - ### buildCurveMaker

    public static PACurveMaker buildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon)
    Parameters:
      `points` - a dense point set
      `epsilon` - controls amount of thinning of 0points to derive rdpPoints
    Returns:
      a partially initialized PACurveMaker instance, requires a later call to calculateDeriverPoints()

  - ### buildCurveMaker

    public static PACurveMaker buildCurveMaker(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor)
    Creates a PACurveMaker from supplied points, caller must complete construction with a call to calculateDerivedPoints() to generate rdpPoints and other instance variables. Sets various properties used for drawing PACurveMaker graphics.
    Parameters:
      `points` - a dense point set
      `epsilon` - controls amount of thinning of points to derive rdpPoints
      `dragColor` -
      `dragWeight` -
      `rdpColor` -
      `rdpWeight` -
      `curveColor` -
      `curveWeight` -
      `brushColor` -
      `brushWeight` -
      `activeBrushColor` -
    Returns:
      a partially initialized PACurveMaker instance, requires a later call to calculateDeriverPoints()

  - ### buildCurveMakerComplete

    public static PACurveMaker buildCurveMakerComplete(ArrayList<processing.core.PVector> points)
    Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.
    Parameters:
      `points` - a dense point set
    Returns:
      a fully initialized PACurveMaker instance

  - ### buildCurveMakerComplete

    public static PACurveMaker buildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon)
    Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true.
    Parameters:
      `points` - a dense point set
      `epsilon` - controls amount of thinning of points to derive rdpPoints
    Returns:
      a fully initialized PACurveMaker instance

  - ### buildCurveMakerComplete

    public static PACurveMaker buildCurveMakerComplete(ArrayList<processing.core.PVector> points, float epsilon, int dragColor, float dragWeight, int rdpColor, float rdpWeight, int curveColor, float curveWeight, int brushColor, float brushWeight, int activeBrushColor)
    Creates a PACurveMaker from supplied points and calls calculatedDerivedPoints() to initialize rdpPoints, curveShape, eventPoints, and brushPoly and set isReady to true. Sets various properties used for drawing PACurveMaker graphics.
    Parameters:
      `points` - a dense point set
      `epsilon` - controls amount of thinning of points to derive rdpPoints
      `dragColor` -
      `dragWeight` -
      `rdpColor` -
      `rdpWeight` -
      `curveColor` -
      `curveWeight` -
      `brushColor` -
      `brushWeight` -
      `activeBrushColor` -
    Returns:
      a fully initialized PACurveMaker instance

  - ### reducePoints

    public void reducePoints(float epsilon)
    Takes the list of points in allPoints and generates a reduced list in drawPoints.
    Parameters:
      `epsilon` - controls amount of thinning applied to dragPoints to derive rdpPoints

  - ### calculateDerivedPoints

    public void calculateDerivedPoints()
    Calculates rdpPoints, curveShape, eventPoints, brushShape and brushPoly. Sets isReady to true on completion. If you change epsilon, polySteps, eventSteps or isUseWeighted, call calculateDerivedPoints to refresh the drawing objects.

  - ### isReady

    public boolean isReady()

  - ### isDrawWeighted

    public boolean isDrawWeighted()

  - ### setDrawWeighted

    public void setDrawWeighted(boolean isDrawWeighted)

  - ### getBrushSize

    public float getBrushSize()

  - ### setBrushSize

    public void setBrushSize(float brushSize)

  - ### getEpsilon

    public float getEpsilon()

  - ### setEpsilon

    public void setEpsilon(float epsilon)

  - ### getBezierBias

    public float getBezierBias()

  - ### setBezierBias

    public void setBezierBias(float bias)

  - ### getDragPoints

    public ArrayList<processing.core.PVector> getDragPoints()

  - ### setDragPoints

    public void setDragPoints(ArrayList<processing.core.PVector> dragPoints)
    If you change the value of dragPoints, immediately call calculateDerivedPoints() to refresh all drawing objects.
    Parameters:
      `dragPoints` - ArrayList, a dense set of points for drawing a line

  - ### getDragColor

    public int getDragColor()

  - ### setDragColor

    public void setDragColor(int dragColor)

  - ### getDragWeight

    public float getDragWeight()

  - ### setDragWeight

    public void setDragWeight(float dragWeight)

  - ### getRdpPoints

    public ArrayList<processing.core.PVector> getRdpPoints()

  - ### setRdpPoints

    public void setRdpPoints(ArrayList<processing.core.PVector> rdpPoints)
    Sets rdpPoints, generally not something you want to do: let reducePoints() or calculateDerivedPoints() derive rdpPoints from dragPoints instead.
    Parameters:
      `rdpPoints` -

  - ### getRdpIndices

    public ArrayList<Integer> getRdpIndices()

  - ### getRdpIndicesAsInts

    public int[] getRdpIndicesAsInts()

  - ### setRdpIndices

    public void setRdpIndices(ArrayList<Integer> rdpIndices)
    Sets rdpIndices, generally not something you want to do. Call reducePoints() or calculateDerivedPoints instead and stay out of trouble.
    Parameters:
      `rdpIndices` -

  - ### getRdpColor

    public int getRdpColor()

  - ### setRdpColor

    public void setRdpColor(int rdpColor)

  - ### getRdpWeight

    public float getRdpWeight()

  - ### setRdpWeight

    public void setRdpWeight(float rdpWeight)

  - ### getCurveShape

    public PABezShape getCurveShape()

  - ### getWeightedCurveShape

    public PABezShape getWeightedCurveShape(float bias)
    Calculates a PABezSHape with distances between control points and anchor points adjusted by bezierBias. Does not store the returned curve.
    Parameters:
      `bias` - a parameter to adjust distances between Bezier anchor points and control points.
    Returns:
      a Bezier curve shape whose control points are adjusted using bezierBias.

  - ### getWeightedCurveShape

    public PABezShape getWeightedCurveShape()

  - ### setCurveShape

    public void setCurveShape(PABezShape curveShape)

  - ### getCurveColor

    public int getCurveColor()

  - ### setCurveColor

    public void setCurveColor(int curveColor)

  - ### getCurveWeight

    public float getCurveWeight()

  - ### setCurveWeight

    public void setCurveWeight(float curveWeight)

  - ### getBrushShape

    public PABezShape getBrushShape()

  - ### getWeightedBrushShape

    public PABezShape getWeightedBrushShape()

  - ### getWeightedBrushShape

    public PABezShape getWeightedBrushShape(float brushSize, float bias)

  - ### setBrushShape

    public void setBrushShape(PABezShape brushShape)

  - ### getBrushColor

    public int getBrushColor()

  - ### setBrushColor

    public void setBrushColor(int brushColor)

  - ### getBrushWeight

    public float getBrushWeight()

  - ### setBrushWeight

    public void setBrushWeight(float brushWeight)

  - ### getActiveBrushColor

    public int getActiveBrushColor()

  - ### setActiveBrushColor

    public void setActiveBrushColor(int activeBrushColor)

  - ### getBrushPoly

    public ArrayList<processing.core.PVector> getBrushPoly()

  - ### getPolySteps

    public int getPolySteps()

  - ### setPolySteps

    public void setPolySteps(int polySteps)

  - ### getEventPoints

    public ArrayList<processing.core.PVector> getEventPoints()

  - ### getEventPoints

    public ArrayList<processing.core.PVector> getEventPoints(int eventSteps)

  - ### setEventPoints

    public void setEventPoints(ArrayList<processing.core.PVector> eventPoints)

  - ### getEventSteps

    public int getEventSteps()

  - ### setEventSteps

    public void setEventSteps(int eventSteps)

  - ### getEventPointsColor

    public int getEventPointsColor()

  - ### setEventPointsColor

    public void setEventPointsColor(int eventPointsColor)

  - ### getEventPointsSize

    public float getEventPointsSize()

  - ### setEventPointsSize

    public void setEventPointsSize(float eventPointsSize)

  - ### getTimeStamp

    public int getTimeStamp()

  - ### setTimeStamp

    public void setTimeStamp(int timeStamp)

  - ### getTimeOffset

    public int getTimeOffset()

  - ### setTimeOffset

    public void setTimeOffset(int timeOffset)

  - ### getDragTimes

    public ArrayList<Integer> getDragTimes()

  - ### getDragTimesAsInts

    public int[] getDragTimesAsInts()

  - ### setDragTimes

    public void setDragTimes(ArrayList<Integer> dragTimes)

  - ### dragPointsDraw

    public void dragPointsDraw(processing.core.PApplet parent, int dragColor, float dragWeight)
    Draws a line using the PVector data in dragPoints and a supplied color.
    Parameters:
      `parent` - a PApplet where drawing takes place
      `dragColor` - color for the line that is drawn

  - ### dragPointsDraw

    public void dragPointsDraw(processing.core.PApplet parent)
    Draws a line using the PVector data in allPoints and the current values of this.dragColor and this.dragWeight.
    Parameters:
      `parent` - a PApplet where drawing takes place

  - ### reducedPointsDraw

    public void reducedPointsDraw(processing.core.PApplet parent, int rdpColor, float drawWeight)
    Draws a line using the PVector data in drawPoints, the reduced point set derived from allPoints.
    Parameters:
      `parent` - a PApplet where drawing takes place
      `rdpColor` - the color for the line that is drawn
      `drawWeight` - the weight of the line that is drawn

  - ### reducedPointsDraw

    public void reducedPointsDraw(processing.core.PApplet parent)
    Draws a line using the PVector data in rdpPoints and the current values of this.rdpColor and this.rdpWeight.
    Parameters:
      `parent` - a PApplet where drawing takes place

  - ### dragPointsDraw

    public void dragPointsDraw(processing.core.PGraphics pg, int dragColor, float dragWeight)
    Draws dragPoints to a PGraphics using supplied color and weight.
    Parameters:
      `pg` - a PGraphics offscreen graphics context
      `dragColor` - color for the line through the dense point set
      `dragWeight` - weight (in pixels) of the line through the dense point set

  - ### dragPointsDraw

    public void dragPointsDraw(processing.core.PGraphics pg)
    Draws dragPoints to a PGraphics using local color and weight, this.dragColor and this.dragWeight.
    Parameters:
      `pg` - a PGraphics offscreen graphics context

  - ### reducedPointsDraw

    public void reducedPointsDraw(processing.core.PGraphics pg, int rdpColor, float rdpWeight)
    Draws rdpPoints to a PGraphics using supplied color and weight.
    Parameters:
      `pg` - a PGraphics offscreen graphics context
      `rdpColor` - color for the line through the reduced point set
      `rdpWeight` - weight (in pixels) of the line through the reduced point set

  - ### reducedPointsDraw

    public void reducedPointsDraw(processing.core.PGraphics pg)
    Draws drawPoints to a PGraphics using current values of this.rdpColor and this.rdpWeight.
    Parameters:
      `pg` - a PGraphics offscreen graphics context

  - ### curveDraw

    public void curveDraw(processing.core.PApplet parent)
    Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight. The resulting curve will have no fill.
    Parameters:
      `parent` - a PApplet instance

  - ### curveDrawDirect

    public void curveDrawDirect(processing.core.PApplet parent)
    Draws a Bezier curve using local drawing properties of curveShape. If the drawing properties use a fill, the resulting curve will have a fill.
    Parameters:
      `parent` - a PApplet instance

  - ### curveDraw

    public void curveDraw(processing.core.PGraphics pg)
    Draws a Bezier curve using the 2D Bezier curve data in this.curveShape and the current values of this.curveColor and this.curveWeight. The resulting curve will have no fill.
    Parameters:
      `pg` - a PGraphics offscreen graphics context

  - ### curveDrawDirect

    public void curveDrawDirect(processing.core.PGraphics pg)
    Draws a Bezier curve using local drawing properties of this.curveShape as a PABezShape. If the drawing properties use a fill, the resulting curve will have a fill.
    Parameters:
      `pg` - a PGraphics offscreen graphics context

  - ### brushDraw

    public void brushDraw(processing.core.PApplet parent, int brushColor, int strokeColor, float brushWeight)
    Draws the stored brushShape to a PApplet using supplied fill color, stroke color, and weight. If brushWeight == 0, there is no stroke.
    Parameters:
      `parent` -
      `brushColor` -
      `strokeColor` -
      `brushWeight` -

  - ### brushDraw

    public void brushDraw(processing.core.PApplet parent)
    Draws the stored brushShape to a PApplet using local properties this.brushColor, this.brushColor, this.brushWeight.
    Parameters:
      `parent` -

  - ### brushDrawDirect

    public void brushDrawDirect(processing.core.PApplet parent)
    Draws the stored brush shape to a PApplet using its properties as a PABezShape.
    Parameters:
      `parent` -

  - ### brushDraw

    public void brushDraw(processing.core.PGraphics pg, int brushColor, int strokeColor, float brushWeight)
    Draws the stored brushShape to an offscreen PGraphics using supplied fill color, stroke color, and weight. If brushWeight == 0, there is no stroke.
    Parameters:
      `parent` -
      `brushColor` -
      `strokeColor` -
      `brushWeight` -

  - ### brushDraw

    public void brushDraw(processing.core.PGraphics pg)
    Draws the stored brushShape to an offscreen PGraphics using local properties this.brushColor, this.brushColor, this.brushWeight.
    Parameters:
      `parent` -

  - ### brushDrawDirect

    public void brushDrawDirect(processing.core.PGraphics pg)
    Draws the stored brush shape to an offscreen PGraphics using its properties as a PABezShape.
    Parameters:
      `parent` -

  - ### eventPointsDraw

    public void eventPointsDraw(processing.core.PApplet parent)
    Draws this.eventPoints to a PApplet as circles using local properties this.eventPointsColor and this.eventPointsSize.
    Parameters:
      `parent` -

  - ### eventPointsDraw

    public void eventPointsDraw(processing.core.PApplet parent, int eventPointsColor, float eventPointsSize)
    Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsColor and eventPointsSize.
    Parameters:
      `parent` -
      `eventPointsColor` -
      `eventPointsSize` -

  - ### eventPointsDraw

    public void eventPointsDraw(processing.core.PApplet parent, int eventSteps, int eventPointsColor, float eventPointsSize)
    Draws this.eventPoints to a PApplet as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize. EventPointsSteps determines the number of circles. The local value eventPointsSteps is not changed.
    Parameters:
      `parent` -
      `eventSteps` -
      `eventPointsColor` -
      `eventPointsSize` -

  - ### eventPointsDraw

    public void eventPointsDraw(processing.core.PGraphics pg)
    Draws this.eventPoints to an offscreen PGraphics as circles using local properties this.eventPointsColor and this.eventPointsSize.
    Parameters:
      `pg` -

  - ### eventPointsDraw

    public void eventPointsDraw(processing.core.PGraphics pg, int eventPointsColor, float eventPointsSize)
    Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsColor and eventPointsSize.
    Parameters:
      `pg` -
      `eventPointsColor` -
      `eventPointsSize` -

  - ### eventPointsDraw

    public void eventPointsDraw(processing.core.PGraphics pg, int eventSteps, int eventPointsColor, float eventPointsSize)
    Draws this.eventPoints to an offscreen PGraphics as circles using supplied properties eventPointsSteps, eventPointsColor and eventPointsSize. Parameter eventPointsSteps determines the number of circles. The local value eventPointsSteps is not changed.
    Parameters:
      `pg` -
      `eventSteps` -
      `eventPointsColor` -
      `eventPointsSize` -