spline

command module
v0.0.0-...-3b77c3c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL