Previous: filbx Up: ../plot79_f.html Next: filpa3
SUBROUTINE FILPA2 (XARRAY,INCX, YARRAY,INCY, N, PDIST, NPDIST,
X THETA, BOX, ALPHA)
C$ (Fill Polygon Absolute 2-D)
C$ Fill an arbitrary general 2-D polygon with a user-defined
C$ pattern. The pattern is defined by a series of parallel
C$ lines with variable spacing and fixed slope. Two calls to
C$ this routine can be used to obtain cross-hatching. The
C$ arguments are:
C$
C$ XARRAY(*).........Array of absolute X coordinates of
C$ polygon vertices.
C$ INCX..............Displacement between successive X values
C$ in XARRAY(*) (normally 1).
C$ YARRAY(*).........Array of absolute Y coordinates of
C$ polygon vertices.
C$ INCY..............Displacement between successive Y values
C$ in YARRAY(*) (normally 1).
C$ N.................Number of data points defining the
C$ polygon. The polygon is automatically
C$ closed by connecting point N to point 1.
C$ A move will be done to the point 1 before
C$ beginning to draw the polygon.
C$ PDIST(*)..........Array of world coordinate perpendicular
C$ distances between successive lines of the
C$ pattern. The sign of PDIST(K) is
C$ ignored. In order to prevent an
C$ excessive number of lines being drawn
C$ because of tiny PDIST(*) values (which
C$ might cause a pen plotter to cut through
C$ the paper), a minimal distance is
C$ enforced internally, corresponding to
C$ MAXLIN (=1000 in a DATA statement) lines
C$ across the box.
C$ NPDIST............Number of entries in PDIST(*) (.GE. 1).
C$ Line K will be spaced a distance PDIST(1
C$ + MOD(K-1,NPDIST)) from line K-1, so that
C$ PDIST(*) is used circularly. It is an
C$ error if NPDIST .LE. 0.
C$ THETA.............Angle of lines (in degrees) measured
C$ counterclockwise from the X axis.
C$ BOX............... .TRUE. - Draw the polygon outline.
C$ .FALSE. - Do not draw an outline.
C$ ALPHA(N)..........REAL working array for temporary storage
C$ of line segment parameters during
C$ clipping.
C$
C$ If an increment INCX or INCY is negative, the starting
C$ vertex is taken as (1-N)*INC + 1 instead of 1, so that the
C$ array is stepped through in reverse order.
C$
C$ (15-JAN-83)