aerocaps.geom.nurbs_purepython.bezier_surf_eval#

bezier_surf_eval(p: List[List[List[float]]], u: float, v: float) 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 a \((u,v)\) parameter pair 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)

  • 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ézier surface at \((u,v)\). Has the same size as the innermost dimension of p

Return type:

List[float]