Skip to content

pymath.eval_bezier

Daniel Flassig edited this page Jun 24, 2026 · 1 revision

Evaluates a Bézier curve at parameter t, given its control points.

result = pymath.eval_bezier(t, p1, p2 [, p3, ...])
Parameter Type Description
t number Curve parameter, typically in [0, 1].
p1, p2, ... number or point The control points (at least two). n points define a Bézier curve of degree n - 1.

Return value

Type Description
result The curve point at t: a number if the control points are numbers, or a point of the same dimension if they are tables.

Notes:

  • All control points must be the same type; the dimension is taken from the first point.
  • For the tangent instead of the position, see pymath.eval_bezier_deriv.

Example:

-- scalar control points (quadratic)
local y = pymath.eval_bezier(0.5, 0, 1, 1)
-- y == 0.75

-- 2D control points
local p = pymath.eval_bezier(0.5, {0, 0}, {1, 2})
-- p == {0.5, 1}

Version Support:

Minimum PYTHA Version: V27

See also:

pymath, pymath.eval_bezier_deriv

Clone this wiki locally