aerocaps.geom.nurbs_purepython.bezier_surf_eval_grid#

bezier_surf_eval_grid(p: List[List[List[float]]], nu: int, nv: int) List[List[List[float]]][source]#

Evaluates a Bézier 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 B_{i,n}(u) B_{j,m}(v) \mathbf{P}_{i,j}\]
Parameters:
  • p (List[List[List[float]]]) – 3-D list or array of control points where the innermost dimension can have any size, but typical sizes include 2 (\(x\)-\(y\) space), 3 (\(x\)-\(y\)-\(z\) space) and 4 (\(x\)-\(y\)-\(z\)-\(w\) space)

  • 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ézier surface at \((u,v)\). Output array has size \(N_u \times N_v \times d\), where \(d\) is the spatial dimension (usually either 2, 3, or 4)

Return type:

List[List[List[float]]]