Previous: pgnr2 Up: ../plot79_p.html Next: pl2ca
SUBROUTINE PGNR3 (DXARAY,INCX, DYARAY,INCY, DZARAY,INCZ, NVERTX) C$ (Polygon Relative 3-D) C$ Draw a 3-D polygon. A relative move is automatically made C$ from the current point to the first vertex, relative draws C$ are made between all remaining vertices, and then implicit C$ closure is provided by connecting the last vertex to the C$ first. On return, the current point is at the first vertex. C$ C$ If a polygon "plain" interior style filling and a visible C$ pattern or color has been selected by a prior call to C$ SETPIS and SETPFI/SETPCI, the polygon is filled with that C$ pattern or color. The polygon vertices are assumed to be C$ arranged so that the interior lies to the left of each line C$ segment between vertices i and i+1. The arguments are: C$ C$ DXARAY(*)........Array of relative X coordinates C$ INCX.............Displacement between successive X C$ coordinates in DXARAY(*) (normally 1). C$ DYARAY(*)........Array of relative Y coordinates. C$ INCY.............Displacement between successive Y C$ coordinates in DYARAY(*) (normally 1). C$ DZARAY(*)........Array of relative Z coordinates. C$ INCZ.............Displacement between successive Z C$ coordinates in DZARAY(*) (normally 1). C$ NVERTX...........Number of polygon vertices (.GE. 3). C$ C$ If an increment INCX, INCY, or INCZ is negative, the C$ starting vertex is taken as (1-N)*INC + 1 instead of 1, so C$ that the array is stepped through in reverse order. C$ Because of the ordering convention on the vertices, C$ reversing the order of traversal of the vertex list C$ interchanges the interior and the exterior of the polygon. C$ No error is raised if there are fewer than 3 vertices, but C$ filling will be suppressed. C$ C$ In the current implementation of this routine, it is C$ necessary to expand the relative coordinates internally to C$ a list of absolute coordinates which are then passed to C$ PGNA3. This expansion is done in working arrays in COMMON C$ whose size limits the number of vertices. If more vertices C$ are provided, a warning message will be issued and the C$ additional vertices will simply be ignored. The limit is C$ at present 255 vertices. C$ (21-APR-83)