Command: cspline

Syntax

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

Description

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

Parameters

Switches

Notes

If the command has the form <entity> = cspline, 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.

A cspline curve passes through all control points.

Examples

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

cspline -ap=20 {
    pseries
}

Create a named polyline entity.

entity my_spline = cspline -col=blue { pseries }

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

point cps[]
cspline -ap=5, -op=cps { pseries }

Add spline points to a lines entity under creation.

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

See Also

Commands:

bezier, bspline, entity, gstructure, point

Identifiers:

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

Structures:

entity (lines)