Command: bezier

Syntax

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

Description

Creates a polyline graphic entity, or a series of points forming a Bezier curve from a set of control points.

Parameters

Switches

Notes

If the command has the form <entity> = bezier, 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 Bezier curve passes through all control points.

Examples

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

bezier -ap=20 { pseries }

Create a named polyline entity.

entity my_spline = bezier -col=green { pseries }

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

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

Add spline points during creation of a lines entity.

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

See Also

Commands:

bspline, cspline, entity, gstructure, point

Identifiers:

def_color (color), def_fragment (numeric)

Structures:

entity (lines)