spl - Spline generation

Name

spl — Spline generation

Syntax

spl [ten tension] [lin] [steplen steplength] [sav]

Description

Spline under tension. Generate and display a spline through the data points in active.

Arguments

ten tension

Will apply a tension value for each point to tighten the spline.

lin

Draw the spline as a line instead of a tube.

steplen steplength

Will apply steplength as distance between curve points when generating the spline.

sav [nodraw]

Save the spline curve in active. nodraw: Just generate, do not display the spline.

Examples

Ex.1: Draw a spline under tension through data points

win demo          ;# Get demo window (450000 460000 6450000 6460000 1000 1000)
spe bgc whi       ;# Specify background color to white
mak ran 5         ;# Make random points
poi               ;# Display the points
spe liw 2         ;# Specify linewidth 2
spl lin           ;# Draw a spline curve with with tension 0 (default)
spl lin ten 1     ;# Draw a spline curve with with tension 1
spl lin ten 2     ;# Draw a spline curve with with tension 2
spl lin ten 5     ;# Draw a spline curve with with tension 5
spe liw 1         ;# Reset linewidth to 1

The above example produces this image.


Samples of spline under tension curve

See also

cur - Curve display