Previous: filpi Up: ../plot79_f.html Next: filxa3
SUBROUTINE FILXA2 (XARRAY,INCX, YARRAY,INCY, N, PDIST, NPDIST,
X BOX, THETA, NORMAL)
C$ (Fill Convex Polygon Absolute 2-D)
C$ Fill a convex 2-D polygon with a user-defined pattern. The
C$ pattern is defined by a series of parallel lines with
C$ variable spacing and fixed slope. Unpredictable results
C$ will be obtained if the polygon is not convex. FILPA2
C$ should be used for filling general polygons, but this
C$ routine is faster when the polygon is known to be convex.
C$ Two calls to this routine can be used to obtain
C$ cross-hatching. The arguments are:
C$
C$ XARRAY(*).........Array of absolute X coordinates.
C$ INCX..............Displacement between successive X values
C$ in XARRAY(*) (normally 1).
C$ YARRAY(*).........Array of absolute Y coordinates.
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$ BOX............... .TRUE. - Draw a box around the
C$ rectangular region.
C$ .FALSE. - Do not draw a box.
C$ THETA.............Angle of lines (in degrees) measured
C$ counterclockwise from the X axis.
C$ NORMAL(4,N).......REAL working array for temporary storage
C$ of edge normals during 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$ (30-JAN-82)