astPrism

Create a Prism

Description:

This function creates a new Prism and optionally initialises its attributes.

A Prism is a Region which represents an extrusion of an existing Region into one or more orthogonal dimensions (specified by another Region). If the Region to be extruded has N axes, and the Region defining the extrusion has M axes, then the resulting Prism will have (M+N) axes. A point is inside the Prism if the first N axis values correspond to a point inside the Region being extruded, and the remaining M axis values correspond to a point inside the Region defining the extrusion.

As an example, a cylinder can be represented by extruding an existing Circle, using an Interval to define the extrusion. Ih this case, the Interval would have a single axis and would specify the upper and lower limits of the cylinder along its length.

Synopsis

AstPrism astPrism( AstRegion region1, AstRegion region2, const char options, ... )

Parameters:

region1
Pointer to the Region to be extruded.
region2
Pointer to the Region defining the extent of the extrusion.
options
Pointer to a null-terminated string containing an optional comma-separated list of attribute assignments to be used for initialising the new Prism. The syntax used is identical to that for the astSet function and may include " printf" format specifiers identified by " %" symbols in the normal way.
...
If the " options" string contains " %" format specifiers, then an optional list of additional arguments may follow it in order to supply values to be substituted for these specifiers. The rules for supplying these are identical to those for the astSet function (and for the C " printf" function).

Returned Value

astPrism()
A pointer to the new Prism.

Notes: