HermiteSpline#
- class splinebox.spline_curves.HermiteSpline(M, basis_function, closed=False, control_points=None, tangents=None, padding_function=<function padding_function>)#
Class for the construction of a Hermite spline. It inherits from
splinebox.spline_curves.Spline. Here, we only document the additional methods and attributes. For information on the inherited methods and attributes refere to the documentation ofsplinebox.spline_curves.Spline.Parameters#
- Mint
Number of control points.
- basis_function
splinebox.basis_functions.BasisFunction The basis function used to construct the spline. The
multigeneratorattribute has to be true and theevalmethod has to return two values instead of one.- closedboolean
Whether or not the spline is closed, i.e. the two ends are connected.
Attributes
The basis function of the spline.
The control points of this spline, i.e. the c[k] in equation (1).
The knots of this spline, i.e. the values of the spline at \(t=0,1,...,M\).
The tangents of this spline.
Methods
arc_length([stop, start, epsabs, epsrel])Compute the arc length of the spline between the two parameter values specified.
arc_length_to_parameter(s[, atol])Convert the arc length s to the coresponding value in parameter space.
copy()Returns a deep copy of this spline.
curvature(t)Compute the curcature of the spline at position(s) t.
This energy can be used to enforce equal spacing of the knots.
distance(point[, return_t])Computes the distance of point from the spline.
draw(x, y)Computes whether a point is inside or outside a closed spline on a regular grid of points.
dtheta(t)Helper function for calculating the winding number.
eval(t[, derivative])Evalute the spline or one of its derivatives at parameter value(s) t.
fit(points[, arc_length_parameterization])Fit the provided points with the spline using least squares.
from_json(path)Constructs a spline from a json file that was saved using
splinebox.spline_curves.Spline.to_json().is_inside(x, y)Determines if a point with coordinates x, y is inside the spline.
mesh([radius, step_t, step_angle, ...])Create a 3D mesh around the spline curve.
moving_frame(t[, method, initial_vector])Compute a moving frame (local orthonormal coordinate system) along the spline.
normal(t[, frame, initial_vector])Returns the normal vector for 1D and 2D splines.
rotate(rotation_matrix[, centred])Rotate the spline with the provided rotation matrix.
scale(scaling_factor)Enlarge or shrink the spline by the provided factor.
to_json(path[, version])Saves the spline as a json file.
translate(vector)Translates the spline by a vector.