aerocaps.geom.nurbs_purepython.bspline_surf_eval#
- bspline_surf_eval(p: List[List[List[float]]], ku: List[float], kv: List[float], u: float, v: float) List[float][source]#
Evaluates a B-spline surface with \(n+1\) control points in the \(u\)-direction and \(m+1\) control points in the \(v\)-direction at a \((u,v)\) parameter pair according to
\[\mathbf{S}(u,v) = \sum\limits_{i=0}^n \sum\limits_{j=0}^m N_{i,q}(u) N_{j,r}(v) \mathbf{P}_{i,j}\]where \(N_{i,q}(t)\) is the B-spline basis function of degree \(q\). The degree of the B-spline in the \(u\)-direction is computed as
q = len(ku) - len(p) - 1, and the degree of the B-spline surface in the \(v\)-direction is computed asr = len(kv) - len(p[0]) - 1.- Parameters:
p (List[List[List[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but the typical size is
3(\(x\)-\(y\)-\(z\) space)ku (List[float]) – 1-D list or array of knots in the \(u\)-parametric direction
kv (List[float]) – 1-D list or array of knots in the \(v\)-parametric direction
u (float) – Parameter value in the \(u\)-direction at which to evaluate the surface
v (float) – Parameter value in the \(v\)-direction at which to evaluate the surface
- Returns:
Value of the B-spline surface at \((u,v)\). Has the same size as the innermost dimension of
p- Return type:
List[float]