aerocaps.geom.nurbs_purepython.rational_bezier_surf_eval_grid#
- rational_bezier_surf_eval_grid(p: List[List[List[float]]], w: List[List[float]], nu: int, nv: int) List[List[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 \(N_u \times N_v\) points along a linearly-spaced rectangular grid in \((u,v)\)-space 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\))nu (int) – Number of linearly-spaced points in the \(u\)-direction. E.g.,
nu=3outputs 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=3outputs 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 rational Bézier 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]]]