aerocaps.geom.nurbs_purepython.bspline_curve_eval#
- bspline_curve_eval(p: List[List[float]], k: List[float], t: float) List[float][source]#
Evaluates a B-spline curve with \(n+1\) control points at a single \(t\)-value according to
\[\mathbf{C}(t) = \sum\limits_{i=0}^n N_{i,q}(t) \mathbf{P}_i\]where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\), defined recursively as
\[N_{i,q} = \frac{t - t_i}{t_{i+q} - t_i} N_{i,q-1}(t) + \frac{t_{i+q+1} - t}{t_{i+q+1} - t_{i+1}} N_{i+1, q-1}(t)\]with base case
\[\begin{split}N_{i,0} = \begin{cases} 1, & \text{if } t_i \leq t < t_{i+1} \text{ and } t_i < t_{i+1} \\ 0, & \text{otherwise} \end{cases}\end{split}\]The degree of the B-spline is computed as
q = k.len() - len(p) - 1.- Parameters:
- Returns:
Value of the B-spline curve at \(t\). Has the same size as the inner dimension of
p- Return type:
List[float]