Stability: 1 (Only additions & fixes)
reference: http://pomax.github.io/bezierinfo/
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/
-
solve (out_vec2: Vec2, curve: Beizer, t: Number): Vec2
Solves the curve (quadric or cubic) for any given parameter t.
source: https://github.com/hyperandroid/CAAT/blob/master/src/Math/Bezier.js
-
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!