aerocaps.geom.nurbs_purepython.nurbs_curve_eval#
- nurbs_curve_eval(p: List[List[float]], w: List[float], k: List[float], t: float) List[float][source]#
Evaluates a Non-Uniform Rational B-Spline (NURBS) curve with \(n+1\) control points at a single \(t\)-value according to
\[\mathbf{C}(t) = \frac{\sum_{i=0}^n N_{i,q}(t) w_i \mathbf{P}_i}{\sum_{i=0}^n N_{i,q}(t) w_i}\]where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline is computed as
q = len(k) - len(p) - 1.- 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.k (List[float]) – 1-D list or array of knots
t (float) – Parameter value \(t\) at which to evaluate
- Returns:
Value of the NURBS curve at \(t\). Has the same size as the inner dimension of
p- Return type:
List[float]