Skip to content

quadraticBezier2

quadraticBezier2(p0, p1, p2, t): Vec2

Defined in: bezier2.ts:20

Evaluates a quadratic Bézier curve at parameter t using the Bernstein form:

B(t) = (1 − t)²·p0 + 2(1 − t)t·p1 + t²·p2

The curve starts at p0, ends at p2, and is tangent to p0 → p1 and p1 → p2 at its endpoints; it does not pass through p1.

Vec2

Start point.

Vec2

Control point.

Vec2

End point.

number

Curve parameter, normally in [0, 1].

Vec2

The point on the curve at t.