Previous: filxa2 Up: ../plot79_f.html Next: fitap
SUBROUTINE FILXA3 (XARRAY,INCX, YARRAY,INCY, ZARRAY,INCZ, N, X PDIST, NPDIST, BOX, THETA, NORMAL) C$ (Fill Convex Polygon Absolute 3-D) C$ Fill a convex 3-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. FILPA3 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$ ZARRAY(*).........Array of absolute Z coordinates. C$ INCZ..............Displacement between successive Z values C$ in ZARRAY(*) (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, 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$ C$ (20-JUL-89)