aerocaps.geom.nurbs_purepython.bspline_surf_eval_grid#

bspline_surf_eval_grid(p: List[List[List[float]]], ku: List[float], kv: List[float], nu: int, nv: int) List[List[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 \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space 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 as r = 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

  • nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g., nu=3 outputs the evaluation of the surface at \(u=0.0\), \(u=0.5\), and \(u=1.0\).

  • nv (int) – Number of linearly-spaced points in the \(v\)-direction. E.g., nv=3 outputs the evaluation of the surface at \(v=0.0\), \(v=0.5\), and \(v=1.0\).

Returns:

Values of \(N_u \times N_v\) points on the B-spline surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually 3)

Return type:

List[List[List[float]]]