splinebox.spline_curves.Spline.
curvature#
- Spline.curvature(t)#
Compute the curvature of the spline at position(s) t. For splines in 1 and 2 dimensions, the signed curvature is returned. Otherwise the unsigned curvature is returned.
- Parameters:
- tfloat or numpy array
The paramter value(s) at which the curvature should be calculated.
- Returns:
- kfloat or numpy array
The curvature value.
Examples
>>> M = 5 >>> spline = splinebox.Spline(M=M, basis_function=splinebox.Exponential(M), closed=False) >>> spline.knots = np.array([[0, 0], [1, 1], [2, 0], [2.5, -0.5], [3, 0]]) >>> spline.curvature([1, 3]) array([ 2.234, -4.104])