Skip to content

Latest commit

 

History

History
71 lines (38 loc) · 2.65 KB

beizer.markdown

File metadata and controls

71 lines (38 loc) · 2.65 KB

Beizer

Stability: 1 (Only additions & fixes)

reference: http://pomax.github.io/bezierinfo/

reference: https://github.com/jackcviers/Degrafa/blob/master/Degrafa/com/degrafa/geometry/utilities/BezierUtils.as

reference: http://cagd.cs.byu.edu/~557/text/ch7.pdf

reference: http://algorithmist.wordpress.com/2009/02/02/degrafa-closest-point-on-quad-bezier/

reference: http://algorithmist.wordpress.com/2009/01/26/degrafa-bezierutils-class/

  • cubic (cp0x: Number, cp0y: Number, cp1x: Number, cp1y: Number, cp2x: Number, cp2y: Number, cp3x: Number, cp3y: Number): Beizer

    cp0 - start point

    cp1 - start control point

    cp2 - end control point

    cp3 - end point

  • from3Points (cp0x: Number, cp0y: Number, cp1x: Number, cp1y: Number, cp2x: Number, cp2y: Number): Beizer

    For implementation see Figure 21.2

    reference: http://pomax.github.io/bezierinfo/

    todo: DO IT!

  • quadric (cp0x: Number, cp0y: Number, cp1x: Number, cp1y: Number, cp2x: Number, cp2y: Number): Beizer

  • quadricFrom3Points (cp0x: Number, cp0y: Number, cp1x: Number, cp1y: Number, cp2x: Number, cp2y: Number)

    For implementation see Figure 21.1

    reference: http://pomax.github.io/bezierinfo/

  • getPoints (curve: Beizer, npoints: Number): Vec2[]

    Solve the curve npoints times and return the solution array.

    see: Polygon.fromBeizer

  • length (curve: Beizer, step: Number): Number

    Calculate the curve length by incrementally solving the curve every substep=CAAT.Curve.k. This value defaults

    to .05 so at least 20 iterations will be performed.

    todo: some kind of cache maybe it's needed!