Skip to main content

Function: subdivideBezier()

subdivideBezier(points, nDivisions): number[][]

Defined in: src/utils/bezier.ts:222

Subdivide a Bézier curve into n_divisions subcurves of the same degree and equal parameter spans, split at t = i / n_divisions.

Each subcurve is the portion over [i / n, (i + 1) / n], which is what Manim CE's memoized subdivision matrices compute for curves of degree up to 3 (the only degrees manim-web produces). Manim CE's higher-degree fallback uses a different successive-split schedule; this equal-interval form is the correct subdivision for every degree.

Parameters​

points​

number[][]

nDivisions​

number

Returns​

number[][]

n_divisions * N control points, the subcurves concatenated in order.