Skip to content

Files

Latest commit

 

History

History
40 lines (29 loc) · 1.3 KB

module_fitting.rst

File metadata and controls

40 lines (29 loc) · 1.3 KB

Curve and Surface Fitting

.. versionadded:: 5.0

fitting module provides functions for interpolating and approximating B-spline curves and surfaces from data points. Approximation uses least squares algorithm.

Please see the following functions for details:

Surface fitting generates control points grid defined in u and v parametric dimensions. Therefore, the input requires number of data points to be fitted in both parametric dimensions. In other words, size_u and size_v arguments are used to fit curves of the surface on the corresponding parametric dimension.

Degree of the output spline geometry is important to determine the knot vector(s), compute the basis functions and build the coefficient matrix, A. Most of the time, fitting to a quadratic (degree = 2) or a cubic (degree = 3) B-spline geometry should be good enough.

In the array structure, the data points on the v-direction come the first and u-direction points come. The index of the data points can be found using the following formula:

index = v + (u * size_{v})

Function Reference

.. automodule:: geomdl.fitting
    :members: