splinepy.bezier.Bezier.compose#

Bezier.compose(inner_function, compute_sensitivities=False)#

Calculates the spline that forms the composition of the inner function spline (function argument), using the caller spline as the outer (or deformation function).

Given an outer function \(\mathcal{T}\) and an inner function (spline) \(\mathcal{K}\), this function returns a new spline function \(\mathcal{M}\) that represents the composition:

\[\mathcal{M}(\mathbf{u}) = \mathcal{T}\big(\mathcal{K}(\mathbf{u})\big) \quad \forall \mathbf{u}\]

If the flag compute_sensitivities is set, compose also returns the derivative of the composed spline with respect to the outer function’s control point positions. This corresponds to the basis function representation (which is given by a scalar valued spline). This functionality differs from composition_derivative(), which computes the derivatives concerning the inner functions geometric parametrization.

Given an outer function \(\mathcal{T}\) with control points \(C_i\) and an inner function \(\mathcal{K}\). This function computes:

\[\frac{\partial\mathcal{T}(\mathcal{K})}{\partial C_i} (\mathbf{u}) = B_i\big(\mathcal{K}\big)(\mathbf{u}) \quad \forall \mathbf{u}\]

where \(B_i\) represents the basis function associated to control point \(C_i\).

Parameters:
  • inner_function (BezierBase) – Bezier-Type Spline that represents inner function

  • compute_sensitivities (bool) – Flag for return values. If set to true returns also sensitivities, default False

Returns:

  • composed (BezierBase) – Composed function

  • sensitivities (list (optional)) – List all splines that represents the derivatives with respect to internal control points