Next: PROJECTION
Up: GREG2 Language Internal Help
Previous: PLOT IMAGE_HOWTO
POLYGON
[GREG2\]POLYGON [(File)Name] [/PLOT] [/VARIABLE] [/FILL [Colour]]
If no argument and no option, it calls the interactive cursor to define
the polygon summits. Type any key to go to next summit, D to correct
the last one and type E to end the polygon definition. The last polygon
side will then appear. The polygon definition may be aborted by typing
Q. For X11 displays, you may use the mouse buttons for the commands.
The left mouse button draws a vertex, the middle mouse button deletes
the last vertex, and the right mouse button ends the polygon
definition.
The drawing of the polygon is not stored in the plot, and will disappear
if you refresh the plot. The polygon values are stored internally; they
can be printed with the command GREG1\WRITE POLYGON, and they correspond
to the variables POLY$NXY (number of vertexes), POLY$X and POLY$Y (the
corresponding coordinates). The currently defined POLYGON is used by the
commands MEAN and MASK.
If a Name is given as argument, the cursor is not called but the summit
coordinates are read from the corresponding file (X is in column 1, Y in
column 2), or corresponding SIC Variable if the option /VARIABLE is also
present.
If you specify the option /PLOT, the current polygon will be plotted as
real vectors in the plot, and no longer as temporary vectors as above.
Option /FILL [Colour] will fill the current polygon, with the current or
specified colour.
Gildas manager
1999-03-12