aerocaps.geom.nurbs_purepython.rational_bezier_surf_eval#

rational_bezier_surf_eval(p: List[List[List[float]]], w: List[List[float]], u: float, v: float) List[float][source]#

Evaluates a rational 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) = \frac{\sum_{i=0}^n \sum_{j=0}^m B_{i,n}(u) B_{j,m}(v) w_{i,j} \mathbf{P}_{i,j}}{\sum_{i=0}^n \sum_{j=0}^m B_{i,n}(u) B_{j,m}(v) w_{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 the typical size is 3 (\(x\)-\(y\)-\(z\) space)

  • w (List[List[float]]) – 2-D list or array of weights corresponding to each of control points. The size of the array must be equal to the size of the first two dimensions of p (\(n+1 \times m+1\))

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

Return type:

List[float]