(points, degree, **kwargs)
return curve
Curve interpolation through the data points.

    Please refer to Algorithm A9.1 on The NURBS Book (2nd Edition), pp.369-370 for details.

    Keyword Arguments:
        * ``centripetal``: activates centripetal parametrization method. *Default: False*

    :param points: data points
    :type points: list, tuple
    :param degree: degree of the output parametric curve
    :type degree: int
    :return: interpolated B-Spline curve
    :rtype: BSpline.Curve
Curve interpolation through the data points.
Curve interpolation through the data points .
def interpolate_curve(points, degree, **kwargs):
    """ Curve interpolation through the data points.

    Please refer to Algorithm A9.1 on The NURBS Book (2nd Edition), pp.369-370 for details.

    Keyword Arguments:
        * ``centripetal``: activates centripetal parametrization method. *Default: False*

    :param points: data points
    :type points: list, tuple
    :param degree: degree of the output parametric curve
    :type degree: int
    :return: interpolated B-Spline curve
    :rtype: BSpline.Curve
    """
    # Keyword arguments
    use_centripetal = kwargs.get('centripetal', False)

    # Number of control points
    num_points = len(points)

    # Get uk
    uk = compute_params_curve(points, use_centripetal)

    # Compute knot vector
    kv = compute_knot_vector(degree, num_points, uk)

    # Do global interpolation
    matrix_a = _build_coeff_matrix(degree, kv, uk, points)
    ctrlpts = linalg.lu_solve(matrix_a, points)

    # Generate B-spline curve
    curve = BSpline.Curve()
    curve.degree = degree
    curve.ctrlpts = ctrlpts
    curve.knotvector = kv

    return curve
def interpolate_curve ( points , degree , * * kwargs ) : # Keyword arguments use_centripetal = kwargs . get ( 'centripetal' , False ) # Number of control points num_points = len ( points ) # Get uk uk = compute_params_curve ( points , use_centripetal ) # Compute knot vector kv = compute_knot_vector ( degree , num_points , uk ) # Do global interpolation matrix_a = _build_coeff_matrix ( degree , kv , uk , points ) ctrlpts = linalg . lu_solve ( matrix_a , points ) # Generate B-spline curve curve = BSpline . Curve ( ) curve . degree = degree curve . ctrlpts = ctrlpts curve . knotvector = kv return curve