splinepy.helpme.fit.surface#
- splinepy.helpme.fit.surface(fitting_points, size, degrees=None, n_control_points=None, knot_vectors=None, fitting_spline=None, associated_queries=None, centripetal=True, interpolate_endpoints=True, verbose_output=False)[source]#
Fits a surface spline with given parameters through given fitting_points. Spline will be interpolated if n_control_points[0]*n_control_points[1] = n_fitting_points and approximated if not.
- Parameters:
fitting_points ((m + 1 x dim) array) – points to be interpolated/approximated
degrees (array-like (int int)) – degree of fitted spline in both directions
n_control_points (array-like (int, int)) – number of control points in each direction
knot_vectors (list of lists [list list]) – knot vectors of fitted spline in both directions
fitting_spline (spline) – spline used for interpolation/approximation must have parametric dimension of 2
associated_queries (list of lists [list list]) – values where the splines will be evaluated (both directions!) will only be used if knot_vectors or fitting_spline is also given!
centripetal (bool) – Default is True. if True -> centripetal parameterization will be used
interpolate_endpoints (bool) – if True -> endpoints are interpolated
verbose_outputs – returns additional information as dict
- Returns:
fitted_spline (spline) – interpolated/approximated spline
residual (float) – residual (coefficient_matrix @ control_points - fitting_points)