Outer radius. Maximum radius of a spike to origin
Number of points in the starburst. Defaults to five, which produces a typical star
OptionalinnerRadius: numberInner radius. A proportionally smaller inner radius makes for sharper spikes. If unspecified, 50% of the outer radius is used.
Origin, or { x:0, y:0 } by default.
Optionalopts: { initialAngleRadian?: number }Options
const points = starburst(4, 100, 200);
Drawing.connectedPoints(ctx, pts, {loop: true, fillStyle: `orange`, strokeStyle: `red`});
Options:
-Math.PI/2 default.
Generates a starburst shape, returning an array of points. By default, initial point is top and horizontally-centred.
pointsof two produces a lozenge shape.pointsof three produces a triangle shape.pointsof five is the familiar 'star' shape.Note that the path will need to be closed back to the first point to enclose the shape.