aerocaps.geom.nurbs_purepython.rational_bezier_curve_eval#
- rational_bezier_curve_eval(p: List[List[float]], w: List[float], t: float) List[float][source]#
Evaluates a rational Bézier curve with \(n+1\) control points at a single \(t\)-value according to
\[\mathbf{C}(t) = \frac{\sum_{i=0}^n B_{i,n}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n B_{i,n}(t) w_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 the typical size is
3(\(x\)-\(y\)-\(z\) space)w (List[float]) – 1-D list or array of weights corresponding to each of control points. Must have length equal to the outer dimension of
p.t (float) – Parameter value \(t\) at which to evaluate
- Returns:
Value of the rational Bézier curve at \(t\). Has the same size as the inner dimension of
p- Return type:
List[float]