Documentation
¶
Overview ¶
Calculates the points of a Catmull-Rom spline chain along a given series of control points, writes the result to the standard output, and optionally generates a plot image of the curve.
Usage:
spline [-pps n] [-alpha a] [-plot png_image_file] [control_points_file]
Flags:
-pps Points per segment between two control points.
(optional, default: 10)
-alpha Alpha value (optional, default: 0.5). The alpha value ranges
from 0 to 1. An alpha value of 0.5 results in centripetal spline,
alpha=0 results in a uniform spline, and alpha=1 results
in a chordal spline.
-plot File path for the output of a plot image of the spline curve in PNG
format. (optional, no plot image generated by default)
The control points file is expected to be a text file with a tab or whitespace separated X and Y coordinate pair per line, e.g.
2 5 3 4.7 4 2
If no control points file is specified the control points are read from the standard input.
Click to show internal directories.
Click to hide internal directories.