Skip to main content

get-bounding-box

function getBoundingBox(ps: number[][]): number[][]

Defined in global-properties/bounds/get-bounding-box.ts:17

Returns a tight axis-aligned bounding box of the given bezier curve.

  • certified: the box is guaranteed to engulf the given bezier curve.

  • returns the box in the form [[minX, minY], [maxX, maxY]

Note!
Green circles are draggable!
0

Parameters:

NameTypeDescription
psnumber[][]an order 1,2 or 3 bezier curve given as an array of its control points, e.g. [[0,0], [1,1], [2,1], [2,0]]