SKETCH is the central plot routine for hidden line removal 3-d plotting. SKETCH is called for each polygon or line segment. Each polygon or line segment is described by a set of points in (x,y,z) arrays. For polygons, these should be in either clockwise or counter-clockwise direction with the last point equal to the first. Holes in polygons are created by continuing the last outer edge point (which is also the first outer edge point) to the inner hole edges and back. The option flag, i, should be 0 for all but the last polygon. When i=0, SKETCH stores the input polygons. When i is set to be 1, the resulting scene visible lines are computed and plotted by calls to PLOT. This process may take considerable cpu time as well as memory storage space when the number of polygons is large. The maximum number of edges of a polygon is 160.
Note that SKETCH requires a large working area in a named COMMON area described in INIT3DH. Note SKETCH will fail if the memory limits are exceeded. For the most part an error flag will be set. Ocassionally, the scene will be corrupted when the memory limits are exceeded without the error flag being set.
CALL SKETCH (x,y,z,np,i) x,y,z (R): arrays contain polygon edges (max 160) np (I): number of points in x,y, and z i (I): option flag. Should be 0 for all input polygons except the last, when it should be 1. (Note: if i+10 is used for i then the first z value is used for all (x,y) points.) i set to -1 (returned) if a memory error occurs