Command: bspline

Syntax

{<entity> = } bspline {
    <pcommand>
    ...
}

Description

Create a polyline graphic entity, or a series of points forming a bspline curve from a set of control points.

Parameters

Switches

Notes

If the command has the form <entity> = bspline, an entity is always created.

If the command has no entity assignment, then an entity will be created only if the -op option is not used, or the command is not within another entity creation block, e.g. lines, polygon.

Bspline curves are bi-cubic curves and as such do not pass through the control points, with the exception of the first and last.

Examples

Create an unnamed polyline entity from a set of control points defined interactively.

bspline -o=3, -ap=20 {
    pseries
}

Create a named polyline entity.

entity my_spline = bspline -o=4, -col=blue { pseries }

Store curve points into an array (no entity created).

point bps[]
bspline -ap=5, -op=bps { pseries } # Default order of 2.

Add spline points during creation of a lines entity.

lines -no_draw {
    gc, e:1000, n:200
    bspline {
        gc
        loop 3 { e:100&n:100, w:100&n:100 }
    }
    n:200, w:1000, r
}

See Also

Commands:

bezier, cspline, entity, gstructure, point

Identifiers:

def_color (color), def_fragment (numeric), def_rank (numeric)

Structures:

entity (lines)