desc.geometry.SplineXYZCurve
- class desc.geometry.SplineXYZCurve(X, Y, Z, knots=None, method='cubic', name='')Source
Curve parameterized by spline knots in X,Y,Z.
- Parameters:
X (array-like) – points for X, Y, Z describing a closed curve
Y (array-like) – points for X, Y, Z describing a closed curve
Z (array-like) – points for X, Y, Z describing a closed curve
knots (ndarray) – arbitrary curve parameter values to use for spline knots, should be a monotonic, 1D ndarray of same length as the input X,Y,Z. If None, defaults to using an equal-arclength angle as the knots If supplied, will be rescaled to lie in [0,2pi]
method (str) –
method of interpolation
'nearest': nearest neighbor interpolation'linear': linear interpolation'cubic': C1 cubic splines (aka local splines)'cubic2': C2 cubic splines (aka natural splines)'catmull-rom': C1 cubic centripetal “tension” splines'cardinal': C1 cubic general tension splines. If used, default tension of c = 0 will be used'monotonic': C1 cubic splines that attempt to preserve monotonicity in the data, and will not introduce new extrema in the interpolated points'monotonic-0': same as ‘monotonic’ but with 0 first derivatives at both endpoints
name (str) – name for this curve
Methods
compute(names[, grid, params, transforms, data])Compute the quantity given by name on grid.
copy([deepcopy])Return a (deep)copy of this object.
eq(other)Compare equivalence between DESC objects.
flip(normal)Flip the curve about the plane with specified normal.
from_values(coords[, knots, method, name, basis])Create SplineXYZCurve from coordinate values.
load(load_from[, file_format])Initialize from file.
rotate([axis, angle])Rotate the curve by a fixed angle about axis in xyz coordinates.
save(file_name[, file_format, file_mode])Save the object.
to_FourierXYZCurve([N, grid, s, name])Convert Curve to FourierXYZCurve representation.
to_SplineXYZCurve([knots, grid, method, name])Convert Curve to SplineXYZCurve.
translate([displacement])Translate the curve by a rigid displacement in x, y, z.
Attributes
Coordinates for X.
Coordinates for Y.
Coordinates for Z.
Knots for spline.
Method of interpolation to usee.
Name of the curve.