Command: prism

Syntax

{<entity> = } prism <point> {
    <pcommand>
    ...
}

Description

Create a prism graphic entity.

Parameters

Switches

Notes

This command always creates a graphic entity unless the prism has a null height. Duplicate consecutive vertices are ignored.

The symbology of polygon edges may be changed by using relevant assignments within the command block, e.g. def_color = red.

During edge definition, a point phrase beginning with a @ will indicate an invisible edge. A phrase beginning with $ will indicate a linestyled edge, using linestyle def_ls. If neither prefix is present, the linestyle given by the -ls switch is used.

Examples

Create an unnamed 6-faceted prism.

prism u:250 { gc, e:500, n:500, w:250, r }

Create an unnamed prism entity (the edges are defined interactively).

plan
prism u:700, -ls=red, -fil=green {
    pseries; # Command
    r; # Point phrase 'return to start'
}

Create a named prism entity in a command block (via a regular polygon of 64 edges).

angle_mode='radians'
numeric nedges = 64, radius = 1000
numeric ang = 0, delta = 1.5*pi/nedges
entity tent = prism (500,500,1500), -fil=blue {
    for i=1,nedges {
        (radius*sin(ang),radius*cos(ang),0)
        ang += delta
    }
}

See Also

Commands:

entity, polygon, gstructure, route

Identifiers:

angle_mode (string), def_color (color), def_fragment (numeric), def_ls (linestyle), def_rank (numeric)

Structures:

entity (prism)