aerocaps.geom.nurbs_purepython.bezier_curve_eval#

bezier_curve_eval(p: List[List[float]], t: float) List[float][source]#

Evaluates a Bézier curve with \(n+1\) control points at a single \(t\)-value according to

\[\mathbf{C}(t) = \sum\limits_{i=0}^n B_{i,n}(t) \mathbf{P}_i\]

where \(B_{i,n}(t)\) is the Bernstein polynomial.

Parameters:
  • p (List[List[float]]) – 2-D list or array of control points where the inner dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • t (float) – Parameter value \(t\) at which to evaluate

Returns:

Value of the Bézier curve at \(t\). Has the same size as the inner dimension of p

Return type:

List[float]