Cutting
Remove redundant or unwanted points.
- storylines.cut.cut(points, minimum=None, maximum=None, join=False)[source]
Cut off curve segments beyond y interval.
- Parameters:
- pointslist of 2-tuple
Vertices of linear spline.
- minimum, maximumfloat, default None
Lower and upper bound of y interval.
- joinbool
Concatenate remaining curve segments?
- Yields:
- list of 2-tuple
Remaining curve segment.
See also
cut
Similar function for 2D case.
- storylines.cut.cut2d(points, xmin, xmax, ymin, ymax, join=False)[source]
Cut off curve segments beyond x and y intervals.
- Parameters:
- pointslist of 2-tuple
Vertices of linear spline.
- xmin, xmaxfloat
Lower and upper bound of x interval.
- ymin, ymaxfloat
Lower and upper bound of y interval.
- joinbool
Concatenate remaining curve segments?
- Yields:
- list of 2-tuple
Remaining curve segment.
See also
cut
Similar function for 1D case.
- storylines.cut.jump(points, distance=1.0)[source]
Interpret long line segments as discontinuities and omit them.
- Parameters:
- pointslist of 2-tuple
Vertices of linear spline.
- distancefloat
Shortest line segment to be omitted.
- Yields:
- list of 2-tuple
Separated curve segment.
- storylines.cut.relevant(points, error=0.001)[source]
Remove irrelevant vertices of linear spline.
- Parameters:
- pointslist of 2-tuple
Vertices of linear spline.
- errorfloat, optional
Tolerated deviation from original spline.
- Yields:
- 2-tuple
Relevant vertex.
- storylines.cut.shortcut(points, length=None, length_rel=1)[source]
Cut off loops at self-intersection points.
- Parameters:
- pointslist of 2-tuple
Vertices of linear spline.
- lengthfloat
Maximum length of loop to be cut off.
- length_relfloat
Maximum length of loop to be cut off relative to the total length of the curve.
- Returns:
- list of 2-tuple
Linear spline with self-intersection loops removed.