Function anim::bezier_utils::evaluate_cubic_bezier

Function Documentation

Point anim::bezier_utils::evaluate_cubic_bezier(const Point &p0, const Point &p1, const Point &p2, const Point &p3, double t)

Evaluates a cubic Bézier curve at parameter t.

Parameters:
  • p0 – Start anchor point.

  • p1 – First control point (start’s out-handle).

  • p2 – Second control point (end’s in-handle).

  • p3 – End anchor point.

  • t – Curve parameter; returns p0 at 0 and p3 at 1.

Returns:

The point on the curve at t.