Bezier curve subdivision
npm install bezier-subdivide
Bezier curve subdivision in JavaScript
Based on Anti-Grain Geometry bezier subdivision
Points are represented by 2-element arrays.
``javascript
var subdivide = require("bezier-subdivide");
var curve = [
[100, 200],
[200, 50],
[50, 100],
[200, 200],
];
var points = subdivide(curve); // subdivided points
`

- points: Array of points (start, control point 1, control point 2, end)
`ts
type Point = [number, number];
interface Options {
approximationScale?: number;
angleTolerance?: number;
cuspLimit?: number;
}
declare function subdivide(
bezierPoints: [Point, Point, Point, Point],
options?: Options
): Point[];
export default subdivide;
``