NAME

mkvec, mkvecl, mkvecv - make a basic picture composed of vectors

SYNOPSIS

#include <mpict_p.h>

PICT mkvecl (mode, nvec, xc, yc, hv)
int mode, nvec, xc[], yc[], hv[];

PICT mkvecv (mode, nvec, vspec)
int mode, nvec, vspec[][3];

DESCRIPTION

mkvec builds vectors based on a pair of (x,y) coordinates and a hidden/visible flag for each vector. The coordinate pair specifies the final point in the vector given that the starting point is the current position. The hidden/visible flag specifies whether the vector is intensified.

nvec is the number of vectors to make.

For mkvecl, xc, and yc are arrays that specify the coordinate pair of each vector; hv is an array of the corresponding hidden/visible flags. If hv is set to V the vector is visible, if the flag is set to H the vector is hidden.

For mkvecv, the (x, y) coordinates and hidden visible flags are specified as triples (rows) in a two-dimensional array, vspec e.g.:

vspec[][3] = {{x0, y0, hv0},{x1,y1,hv1},...}

If the value of mode is RC (relative chaining) then mkvec interprets the first coordinate pair as an offset from arbitrary origin and each remaining pair as an offset from the preceding pair.

If mode is RO (relative origin) then all coordinate pairs are interpreted as an offset from a common origin.

mkvecl and mkvecv return a PICT, a pointer to picture structure that can be used as an argument to mkpic(3U) , mkpar(3U) , or mktop(3U) to build complex or top pictures.

SEE ALSO

mkseg(3U) , mkpic(3U) , mkpar(3U) , or mktop(3U)

DIAGNOSTICS

mkvec prints an error message and returns EOP for the following reasons: