TV80GKS ------- TV80GKS is a TV80LIB shell built on top of GKS. Eventually a portable version will be written in standard FORTRAN. The rou- tines that can not be converted to standard FORTRAN are omitted. The most notable is the WRITE 100 or WRITE OUTPUT TAPE 100. A routine was written called WRTSTR to replace WRITE 100. See the appendix for conversion guidlines. EXECUTING TV80GKS ----------------- TV80GKS users compile and load with the following input lines: Compiling: CIVIC I=source,B=binary,L=listing / t v or CFT77 I=source,B=binary,L=listing / t v Loading: LDR I=binary,LIB=TV80GKS,X=controllee / t v TV80GKS ROUTINES ---------------- CONTROL ROUTINES ---------------- FR80ID (Make an FR80 File) -------------------------- FR80ID selects the FR80 driver as the output workstation as well as the number of blank frames to put between frames. If you are wanting to give your file away, or if you are using KEEP80, you must call KEEP80 before calling FR80ID for it to have an ef- fect. This will use workstation identifier 1. The calling sequence is: CALL FR80ID CALL FR80ID (id) CALL FR80ID (id,ilabel) CALL FR80ID (id,ilabel,icamera) CALL FR80ID (id,ilabel,icamera,ifspace) INTEGER id INTEGER ilabel INTEGER icamera INTEGER ifspace The calling arguments are: id 8 character ascii string used for Identifica- tion purposes. Ignored. ilabel Security label. Ignored. icamera Selects the camera: 2 - 35 mm slide 8 - 35 mm film ifspace The number of blank frames between frames. Example: c Open the 35 mm film workstation CALL KEEP80 (0,3) CALL FR80ID (1,1,8) GSTAT (Release, Inactivate, or Reactivate Device Output) -------------------------------------------------------- This routine will allow you to selectively deactivate, reac- tivate, or deactivate and close a workstation. You do not have to explicitely activate or deactivate a workstation. The works- tation initialization routines will activate the workstation and PLOTE will close and deactivate. The calling sequence is: CALL GSTAT (iwk,istat) INTEGER iwk INTEGER istat The calling arguments are: iwk The workstation identifier. This is the first argument that was passed to the works- tation initialization routine. If you called FR80ID, the identifier was 1. istat The status designation. If istat is nega- tive, the workstation is deactivated and closed. If istat is 0, the workstation is deactivated. If istat is positive, the workstation is reactivated. Example: c Deactivate workstation 1 CALL GSTAT (1,0) PLOTE (Discontinue All Plotting) -------------------------------- This routine empties buffers, deactivates and closes all workstations and closes GKS. The only acceptable calls to the library after PLOTE are the ones that will reopen GKS. Simply stopping your program is not the same as calling PLOTE. You should call this routine before you exit. The calling sequence is: CALL PLOTE () Example: CALL PLOTE () STOP END KEEP80 (Keep/Don't Keep Output Files for Later Use) --------------------------------------------------- This lets you keep your graphics file on disk or give it away to the system. This is used in conjunction with FR80ID. It must be called before FR80ID for it to have an effect. It will not work with any other workstation initialization routine. The default is to keep the file on disk. The calling sequence is: CALL KEEP80 (isave) CALL KEEP80 (isave,idev) INTEGER isave INTEGER idev The calling arguments are: isave Specifies whether to give away your file to the system for processing or to keep your file on disk. 0 - Give files to the system 1 - Keep files on the disk idev The device number. IGNORED. Example: c Give the output file away CALL KEEP80 (0,3) CALL FR80ID (1,1,8) FRAME (Show Current Picture and Start a New One) ------------------------------------------------ This will flush the buffers and advance the frame. The calling sequence is: CALL FRAME () CALL FRAME (nframe) INTEGER nframe The calling arguments are: nframe The number of frame-advance commands inserted is nframe+fspace (see FR80ID for a definition of fspace). Example: c Advance to the next frame CALL FRAME (1) PLOTEA (Flush plotting buffers) ------------------------------- PLOTEA will empty the plotting buffers. It is not necessary to call this routine to have your output appear. However, it may be useful if you are debugging or if you are using a display dev- ice such as a Tektronix, and you want your output to appear. The calling sequence is: CALL PLOTEA () Example: c Empty buffers to update screen CALL PLOTEA () ENDPL (Empty the Plotting Buffers and Rescale Map Values) --------------------------------------------------------- ENDPL will empty the plotting buffers and rescale the map with a call to MAP with the x,y values in the range of 0.0 to 1.0. ENDPL does not end plotting as it's name might imply. The calling sequence is: CALL ENDPL () Example: c Empty buffers and reassign map CALL ENDPL () COLOR (Select Output Color) --------------------------- This subroutine selects the output color for all subsequent output. The buffers are flushed before the color is changed. It is possible to reset the color index with a call to the GKS rou- tine GSCR. The first 8 indices are set to the following colors: 0 = black 4 = blue 1 = red 5 = magenta 2 = green 6 = cyan 3 = yellow 7 = white The calling sequence is: CALL COLOR (index) INTEGER index The calling arguments are: index The color index to associate with all subse- quent plotting. Example: c Set the color to white CALL COLOR (7) MAPPING ROUTINES ---------------- MAP, MAPS, MAPG (Set the mapping to a linear) --------------------------------------------- These routines reset the viewport and set the mapping to linear in x and y. MAP will simply reset the mapping. MAPS will reset the mapping and draw a partial reference grid with tic marks and scale numbers along the axes in the current frame. MAPG will reset the mapping and draw a full reference grid with tic marks and scale numbers along the axes in the current frame. Subsequent frames will not contain the reference grid that the MAPS and MAPG routines draw. To redraw the reference grid you will have to call these routines again. The calling sequence is: CALL MAP (xleft,xright,ybot,ytop) CALL MAP (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPS (xleft,xright,ybot,ytop) CALL MAPS (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPG (xleft,xright,ybot,ytop) CALL MAPG (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) REAL xleft,xright,ybot,ytop REAL vleft,vright,vbot,vtop The calling arguments are: xleft The minimum value in x in user coordinates. xright The maximum value in x in user coordinates. ybot The minimum value in y in user coordinates. ytop The maximum value in y in user coordinates. vleft The minimum value in x in NDC. vright The maxmimum value in x in NDC. vbot The minimum value in y in NDC. vtop The maximum value in y in NDC. Example: c Set mapping to linear and make viewport be in upper left corner CALL MAP (5.0,10.0,-2.5,8.0,0.1,0.4,0.6,0.9) MAPLL, MAPSLL, MAPGLL (Sets the mapping to log-log) --------------------------------------------------- These routines reset the viewport and set the mapping to logarithmic in x and y. MAPLL will simply reset the mapping. MAPSLL will reset the mapping and draw a partial reference grid with tic marks and scale numbers along the axes in the current frame. MAPGLL will reset the mapping and draw a full reference grid with tic marks and scale numbers along the axes in the current frame. Subsequent frames will not contain the reference grid that the MAPSLL and MAPGLL routines draw. To redraw the reference grid you will have to call these routines again. The calling sequence is: CALL MAPLL (xleft,xright,ybot,ytop) CALL MAPLL (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPSLL (xleft,xright,ybot,ytop) CALL MAPSLL (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPGLL (xleft,xright,ybot,ytop) CALL MAPGLL (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) REAL xleft,xright,ybot,ytop REAL vleft,vright,vbot,vtop The calling arguments are: xleft The minimum value in x in user coordinates. xright The maximum value in x in user coordinates. ybot The minimum value in y in user coordinates. ytop The maximum value in y in user coordinates. vleft The minimum value in x in NDC. vright The maxmimum value in x in NDC. vbot The minimum value in y in NDC. vtop The maximum value in y in NDC. Example: c Set mapping to log-log, make viewport in upper left corner CALL MAPLL (100.,1000.,10.,10000.,0.1,0.4,0.6,0.9) MAPSL, MAPSSL, MAPGSL (Sets the mapping to linear-log) ------------------------------------------------------ These routine reset the viewport and set the mapping to linear in x and logorithmic in y. MAPSL will simply specify a mapping. MAPSL will simply reset the mapping. MAPSSL will reset the mapping and draw a partial reference grid with tic marks and scale numbers along the axes in the current frame. MAPGSL will reset the mapping and draw a full reference grid with tic marks and scale numbers along the axes in the current frame. Subse- quent frames will not contain the reference grid that the MAPSSL and MAPGSL routines draw. To redraw the reference grid you will have to call these routines again. The calling sequence is: CALL MAPSL (xleft,xright,ybot,ytop) CALL MAPSL (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPSSL (xleft,xright,ybot,ytop) CALL MAPSSL (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPGSL (xleft,xright,ybot,ytop) CALL MAPGSL (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) REAL xleft,xright,ybot,ytop REAL vleft,vright,vbot,vtop The calling arguments are: xleft The minimum value in x in user coordinates. xright The maximum value in x in user coordinates. ybot The minimum value in y in user coordinates. ytop The maximum value in y in user coordinates. vleft The minimum value in x in NDC. vright The maxmimum value in x in NDC. vbot The minimum value in y in NDC. vtop The maximum value in y in NDC. Example: c Set mapping to lin-log, make viewport in upper left corner CALL MAPSL (5.,16.,10.,10000.,0.1,0.4,0.6,0.9) MAPLS, MAPSLS, MAPGLS (Sets the mapping to log-linear) ------------------------------------------------------ These routine reset the viewport and set the mapping to lo- gorithmic in x and linear in y. MAPLS will simply specify a map- ping. MAPSLS will reset the mapping and draw a partial reference grid with tic marks and scale numbers along the axes in the current frame. MAPGLS will reset the mapping and draw a full reference grid with tic marks and scale numbers along the axes in the current frame. Subsequent frames will not contain the refer- ence grid that the MAPSLS and MAPGLS routines draw. To redraw the reference grid you will have to call these routines again. The calling sequence is: CALL MAPLS (xleft,xright,ybot,ytop) CALL MAPLS (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPSLS (xleft,xright,ybot,ytop) CALL MAPSLS (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) CALL MAPGLS (xleft,xright,ybot,ytop) CALL MAPGLS (xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) REAL xleft,xright,ybot,ytop REAL vleft,vright,vbot,vtop The calling arguments are: xleft The minimum value in x in user coordinates. xright The maximum value in x in user coordinates. ybot The minimum value in y in user coordinates. ytop The maximum value in y in user coordinates. vleft The minimum value in x in NDC. vright The maxmimum value in x in NDC. vbot The minimum value in y in NDC. vtop The maximum value in y in NDC. Example: c Set mapping to log-lin, make viewport in upper left corner CALL MAPLS (10.,10000.,5.,16.,0.1,0.4,0.6,0.9) MAPX (Select A Mapping Routine at Run Time) ------------------------------------------- This routine lets you select from one of the mappings previ- ously specified. The calling sequence is: CALL MAPX (iopt,xleft,xright,ybot,ytop) CALL MAPX (iopt,xleft,xright,ybot,ytop,vleft,vright,vbot,vtop) INTEGER iopt REAL xleft,xright,ybot,ytop REAL vleft,vright,vbot,vtop The calling arguments are: iopt Selects the mapping routines as follows: iopt Routine iopt Routine iopt Routine ---- ------- ---- ------- ---- ------- 1 MAP 5 MAPG 9 MAPS 2 MAPLL 6 MAPGLL 10 MAPSLL 3 MAPSL 7 MAPGSL 11 MAPSSL 4 MAPLS 8 MAPGLS 12 MAPSLS xleft The minimum value in x in user coordinates. xright The maximum value in x in user coordinates. ybot The minimum value in y in user coordinates. ytop The maximum value in y in user coordinates. vleft The minimum value in x in NDC. vright The maxmimum value in x in NDC. vbot The minimum value in y in NDC. vtop The maximum value in y in NDC. Example: c Perform a call to MAPGLL CALL MAPX (6,1.,10000.,10.,1000.,.6,.9,.1,.4) MAPP (Define a Polar Coordinate System) --------------------------------------- This routine lets you define a polar coordinate system, where x is the distance from the origin and y is the number of radians measured from the horizontal axis. Only square windows are allowed for the viewport. The origin is located in the center of the portion of the viewport in use. There is no way to obtain polar mapping using the routine MAPX. The calling sequence is: CALL MAPP (rmax) CALL MAPP (rmax,smin) CALL MAPP (rmax,smin,smax) CALL MAPP (rmax,smin,smax,tmin) REAL rmax,smin,smax,tmin The calling arguments are: rmax Defines the maximum radial value. All radial values must lie between -rmax and rmax. The sign of rmax determines whether or not a scale is drawn. If rmax is positive then vertical and horizontal tic marks and scale numbers will be drawn. If rmax is negative, they will not be drawn. smin The minimum bound in the x direction NDC for the viewport to be placed. The default is 0.001. smax The maximum bound in the x direction in NDC for the viewport to be placed. The default is 0.999. tmin The minimum bound in the y direction in NDC for the viewport to be placed. The default is 0.001. Since the viewport must be square when using a polar mapping, tmax = tmin + (smax-smin). Example: c Create a polar mapping to be placed at .4,.3 to extend to .8,.7 CALL MAPP (10.0,0.4,0.8,0.3) GAXIS (Draw and Label an Axis) ------------------------------ This is a general purpos axis labeling routine. It allows you to specify the location of the axis as well as the format for the labels to place on the axis. The calling sequence is: CALL GAXIS (xb,yb,xe,ye,iori,isize,iside,iformat,idiv,div) REAL xb,yb,xe,ye INTEGER iori,isize,iside,iformat,idiv REAL div The calling arguments are: xb,yb The starting point of the axis in user coor- dinates. xe,ye The ending point of the axis in user coordi- nates. iori The orientation of the label: 0 - horizontal 1 - vertical isize The size of the label: 0 - miniature 1 - small 2 - medium 3 - large iside the side of the axis on which the tick marks and label will be placed. Right and left are determined by standing on the beginning point and looking toward the endpoint. 0 - right 1 - left iformat The format for the plotted text. Legal for- mats are "in", "ew.d", "fw.d", or "on". CAU- TION: Formats must be typed in lowercase letters. The total number of printed charac- ters must be less than or equal to 24. If iformat is I, E, F, or O, and if idiv<0, then the value in the array div is the loca- tion on the axis as well as the label. It is assumed that div(1) contains the minimum value, and div(m) (where m is the absolute value of idiv) contains the maximum value. idiv A special flag. If idiv<0, then the array div contains (the absolute value of) idiv number of items, which will be plotted on the axis according to iformat. If idiv = 0, then nice-numbered labels will be generated between div(1) and div(2). If idiv>0, then there will be idiv labels generated between div(1) and div(2). div An array that contains the information to be plotted. Note that if you are doing nice numbering, and div(1) does not begin at a nice number, then the first nice number less than div(1) will be used. If div(2) does not end on a nice number, then the last label will be a nice number greater than div(2). Example: c Label an axis from 1.5,1.5 to 8.5,1.5 (a horizontal axis) DIV(1) = 2.0 DIV(2) = 8.0 CALL GAXIS (1.5,1.5,8.5,1.5,1,1,0,"i3",0,DIV) TAXIS (Draw an Axis) -------------------- This routine may be called any time after a call to GAXIS has been made. Each time TAXIS is called another axis line is drawn. The new axis is similar to the axis drawn for the last call to GAXIS as the information from that call is remembered. The new axis, with tick marks and without labels, is drawn begin- ning at the specified point and in the same direction as the axis line drawn by GAXIS. The tick mark spacing may be changed each time TAXIS is called. This is accomplished by a relative scaling factor. A positive scale factor of 1.0 draws an axis of exactly the same length as the one drawn for the last call to GAXIS. A negative scale factor will reverse the direction. The calling sequence is: CALL TAXIS (x,y,scale) REAL x,y REAL scale The calling arguments are: x,y The new starting point for the axis to be drawn. scale Scale factor determining the length of the new axis. A positive factor of 1.0 draws an axis of exactly the same length as the one drawn for the last call to GAXIS. A negative scale factor will reverse the direction. Example: c Draw a new axis with reversed ticks at 1.5,5.5 CALL TAXIS (1.5,5.5,-1.0) DDERS (Clip Data That Exceeds Current Viewport) ----------------------------------------------- Specifies how clipping will be done. The default is to have clipping turned off (iclip = 1). The calling sequence is: CALL DDERS (iclip) INTEGER iclip The calling arguments are: iclip A flag to control clipping with the follow values: -1 - clip lines to the viewport. Lines that extend outside of the viewport are clipped to the viewport. Lines that are completely outside of the viewport will not be displayed. +1 - lines are not clipped to viewport. The default. Any portion of a line that can be seen by your window will appear. Example: c Turn clipping off CALL DDERS (1) TRANSFORMATIONS IN 2 DIMENSIONS ------------------------------- INIT2D (Initialize Transformation Matrix) ----------------------------------------- This routine initializes the transformation matrix. It should be called before any other transformation routine is called. This routine will also turn the transformations off by resetting the matrix to the identity. The calling sequence is: CALL INIT2D () Example: c Start the transformations CALL INIT2D () TRAN2D (Translate Your Data) ---------------------------- Translates all subsequent plotting by a given offset. Since TRAN2D is expecting an offset, it must be specified in a linear coordinate system. If you have specified a log coordinate system and would like to translate in the y direction from A to B, the offset in y would be ALOG10(B)-ALOG10(A). The calling sequence is: CALL TRAN2D (dx,dy) REAL dx,dy The calling arguments are: dx,dy The offset to add to each point when plot- ting. Example: c Initialize transform and move points over 1 unit CALL INIT2D () CALL TRAN2D (1.0,0.0) SCAL2D (Scale Your Data) ------------------------ This routine will scale your data. The scaling will be done about the center, see the CENTER routine. The calling sequence is: CALL SCAL2D (sx,sy) REAL sx,sy The calling arguments are: sx,sy The amount to scale in the x and y direc- tions. Example: c Initialize transform and make data 2 times as big. CALL INIT2D () CALL CENTER (100.,100.) CALL SCAL2D (2.0,2.0) ROT2D (Rotate your data) ------------------------ This routine specifies the amount to rotate about the center, see the CENTER routine. The angle is specified in de- grees. The calling sequence is: CALL ROT2D (angle) REAL angle The calling arguments are: angle The amount to rotate couterclockwise around the center specified in degrees. Example: c Initialize the transform and rotate -90 degrees. CALL INIT2D () CALL ROT2D (-90.0) CENTER (Select a New Origin) ---------------------------- This routine sets the point where scaling will be done from and where rotations will rotate around. This point is specified in user coordinates. The calling sequence is: CALL CENTER (cx,cy) REAL cx,cy The calling arguments are: cx,cy The point of the new origin for rotation and scaling. This is specified in user coordi- nates. Example: c Initialize transform and make data 2 times as big. Points that are at c 101.,101. will now appear at 102.,102. (assuming linear mapping) CALL INIT2D () CALL CENTER (100.,100.) CALL SCAL2D (2.0,2.0) LINE AND POINT PLOTTING ROUTINES -------------------------------- SETCRT (Set Position) --------------------- Positions an imaginary drawing beam at x,y. The calling sequence is: CALL SETCRT (x,y,intensity) REAL x,y INTEGER intensity The calling arguments are: x,y The location for the beam. The next plotting command will continue from this point. intensity Not used. Example: c Set position CALL SETCRT (15.0,10.0) VECTOR (Draw a Line from Current Position to New One) ----------------------------------------------------- This routine will draw a line from the current position to a new position. The new position will then become the current po- sition. The calling sequence is: CALL VECTOR (x,y) CALL VECTOR (x,y,intensity) REAL x,y INTEGER intensity The calling arguments are: x,y The coordinates to draw to. This point will become the new current beam position. The beginning point of the vector is the old current beam position. intensity Not used. Example: c Draw a line from 0.,1. to 10.,20. CALL SETCRT (0.,1.) CALL VECTOR (10.,20.) LINE (Draw a Line) ------------------ This routine will draw a line. The end point of the line becomes the new beam position. The calling sequence is: CALL LINE (x,y,u,v) CALL LINE (x,y,u,v,intensity) REAL x,y REAL u,v INTEGER intensity The calling arguments are: x,y The coordinates of the starting point of the line. u,v The coordinates of the ending point of the line. This point will become the new current beam position. intensity Not used. Example: c Draw a line from 0.,1. to 10.,20. CALL LINE (0.,1.,10.,20.) LINEP (Draw a Dotted Line) --------------------------- This routine will plot the points x,y and u,v and will plot additional points in a line between these, spaced a maximum of 2**k raster points apart, where the entire picture plane is as- sumed to be 1024 by 1024 raster points. The calling sequence is: CALL LINEP (x,y,u,v,k) The calling arguments are: x,y The coordinates of the beginning of the line. u,v The coordinates of the end of the line. This will become the new current beam position. k The exponent of 2 used to specify the spac- ing. If the four-argument call is used, k is left unchanged. Initially, k is 2. Example: c Draw a dotted line between 0.,1. and 10.,20. with 2**4 = 16 spacing CALL LINEP (0.,1.,10.,20.,4) POINT (Draw a Point) -------------------- This routine will draw a point at x,y and make it the current beam position. The calling sequence is: CALL POINT (x,y) CALL POINT (x,y,intensity) REAL x,y INTEGER intensity The calling arguments are: x,y The coordinate to place a point at. This will become the new current beam position. intensity Not used. Example: c Draw a point at 10.,20. CALL POINT (10.,20.) POINTS (Draw a Series of Points) -------------------------------- This routine will draw an array of points. The calling sequence is: CALL POINTS (xarray, yarray, num) CALL POINTS (xarray, yarray, num, incx) CALL POINTS (xarray, yarray, num, incx, incy) CALL POINTS (xarray, yarray, num, incx, incy, 0.0) CALL POINTS (xarray, yarray, num, incx, incy, 0.0, 0.0) CALL POINTS (xbase, yarray, num, 0, incy, delx) CALL POINTS (xbase, ybase, num, 0, 0, delx, dely) CALL POINTS (xarray, ybase, num, incx, 0, 0.0, dely) REAL xarray(),yarray() INTEGER num INTEGER incx,incy REAL xbase,ybase REAL delx,dely The calling arguments are: xarray An array holding the x component of the coor- dinates to place points at. The dimension must be at least (num-1)*incx+1 where incx defaults to 1 if it isn't specified other- wise. xbase A single x value which specifies the starting x when the x values are to be automatically generated. (see delx). yarray An array holding the y component of the coor- dinates to place points at. The dimension must be at least (num-1)*incy+1 where incy defaults to 1 if it isn't specified other- wise. ybase A single y value which specifies the starting y when the y values are to be automatically generated. (see dely). num The total number of points to be plotted. incx The increment between successive x coordinate storage locations in xarray. Its default is 1. This argument must be 0 if delx is to be used for automatically generated coordinates. incy The increment between successive y coordinate storage locations in yarray. Its default is 1. This argument must be 0 if dely is to be used for automatically generated coordinates. delx The amount to be added to xbase for generat- ing x coordinates. The first x coordinate is xbase and subsequent values are obtained by iteratively adding delx to the current x coordinate. dely The amount to be added to ybase for generat- ing y coordinates. The first y coordinate is ybase and subsequent values are obtained by iteratively adding dely to the current y coordinate. Example: C Draw a series of points. X will be 0.0,5.0,...45.0 Y will be C taken from the Array. REAL YARRAY(10) CALL POINTS (0.0,YARRAY,10,0,1,5.0) POINTC (Draw a Series of Points and Label with a Character) ----------------------------------------------------------- This routine will draw an array of points. A specified character will be superimposed on those points that are more than kspace raster-points apart, where the entire picture plane is as- sumed to be 1024 by 1024 raster-points square. You can define kspace by calling SETPCH; otherwise, its value is assumed to be 100. Note that the character may not be centered over the given point; it depends upon the chosen character and its defined center. The calling sequence is: CALL POINTC (char, xarray, yarray, num) CALL POINTC (char, xarray, yarray, num, incx) CALL POINTC (char, xarray, yarray, num, incx, incy) CALL POINTC (char, xarray, yarray, num, incx, incy, 0.0) CALL POINTC (char, xarray, yarray, num, incx, incy, 0.0, 0.0) CALL POINTC (char, xbase, yarray, num, 0, incy, delx) CALL POINTC (char, xbase, ybase, num, 0, 0, delx, dely) CALL POINTC (char, xarray, ybase, num, incx, 0, 0.0, dely) CHARACTER*1 char REAL xarray(),yarray() INTEGER num INTEGER incx,incy REAL xbase,ybase REAL delx,dely The calling arguments are: char A single ascii character to be used for plot- ting. xarray An array holding the x component of the coor- dinates to place points at. The dimension must be at least (num-1)*incx+1 where incx defaults to 1 if it isn't specified other- wise. xbase A single x value which specifies the starting x when the x values are to be automatically generated. (see delx). yarray An array holding the y component of the coor- dinates to place points at. The dimension must be at least (num-1)*incy+1 where incy defaults to 1 if it isn't specified other- wise. ybase A single y value which specifies the starting y when the y values are to be automatically generated. (see dely). num The total number of points to be plotted. incx The increment between successive x coordinate storage locations in xarray. Its default is 1. This argument must be 0 if delx is to be used for automatically generated coordinates. incy The increment between successive y coordinate storage locations in yarray. Its default is 1. This argument must be 0 if dely is to be used for automatically generated coordinates. delx The amount to be added to xbase for generat- ing x coordinates. The first x coordinate is xbase and subsequent values are obtained by iteratively adding delx to the current x coordinate. dely The amount to be added to ybase for generat- ing y coordinates. The first y coordinate is ybase and subsequent values are obtained by iteratively adding dely to the current y coordinate. Example: C Draw a series of points with 'A' at each point farther than kspace C away. X will be 0.0,5.0,...45.0 Y will be taken from the Array. REAL YARRAY(10) CALL POINTC ('A',0.0,YARRAY,10,0,1,5.0) TRACE (Draw a Series of Solid Lines) ------------------------------------ This routine will draw lines connecting an array of points. The calling sequence is: CALL TRACE (xarray, yarray, num) CALL TRACE (xarray, yarray, num, incx) CALL TRACE (xarray, yarray, num, incx, incy) CALL TRACE (xarray, yarray, num, incx, incy, 0.0) CALL TRACE (xarray, yarray, num, incx, incy, 0.0, 0.0) CALL TRACE (xbase, yarray, num, 0, incy, delx) CALL TRACE (xbase, ybase, num, 0, 0, delx, dely) CALL TRACE (xarray, ybase, num, incx, 0, 0.0, dely) REAL xarray(),yarray() INTEGER num INTEGER incx,incy REAL xbase,ybase REAL delx,dely The calling arguments are: xarray An array holding the x component of the coor- dinates to draw to. The dimension must be at least (num-1)*incx+1 where incx defaults to 1 if it isn't specified otherwise. xbase A single x value which specifies the starting x when the x values are to be automatically generated. (see delx). yarray An array holding the y component of the coor- dinates to draw to. The dimension must be at least (num-1)*incy+1 where incy defaults to 1 if it isn't specified otherwise. ybase A single y value which specifies the starting y when the y values are to be automatically generated. (see dely). num The total number of coordinate to draw between. incx The increment between successive x coordinate storage locations in xarray. Its default is 1. This argument must be 0 if delx is to be used for automatically generated coordinates. incy The increment between successive y coordinate storage locations in yarray. Its default is 1. This argument must be 0 if dely is to be used for automatically generated coordinates. delx The amount to be added to xbase for generat- ing x coordinates. The first x coordinate is xbase and subsequent values are obtained by iteratively adding delx to the current x coordinate. dely The amount to be added to ybase for generat- ing y coordinates. The first y coordinate is ybase and subsequent values are obtained by iteratively adding dely to the current y coordinate. Example: C Draw a series of lines. X will be 0.0,5.0,...45.0 Y will be C taken from the Array. REAL YARRAY(10) CALL TRACE (0.0,YARRAY,10,0,1,5.0) TRACEP (Draw a Series of Dotted Lines) -------------------------------------- This routine will draw dotted lines connecting an array of points. The dotted lines are made of points spaced a maximum of 2**k raster points apart, where the entire picture plane is as- sumed to be 1024 by 1024 raster-points square. The calling sequence is: CALL TRACEP (xarray, yarray, num) CALL TRACEP (xarray, yarray, num, k) CALL TRACEP (xarray, yarray, num, k, incx) CALL TRACEP (xarray, yarray, num, k, incx, incy) REAL xarray(),yarray() INTEGER num INTEGER k INTEGER incx,incy The calling arguments are: xarray An array holding the x component of the coor- dinates to draw points between. The dimen- sion must be at least (num-1)*incx+1 where incx defaults to 1 if it isn't specified. yarray An array holding the y component of the coor- dinates to draw points between. The dimen- sion must be at least (num-1)*incy+1 where incy defaults to 1 if it isn't specified. num The total number of coordinate to draw between. k The exponent of 2 used to specify the spac- ing. If the three argument call is used, k retains its previous value from the last call to TRACEP. The initial value is 2. incx The increment between successive x coordinate storage locations in xarray. Its default is 1. incy The increment between successive y coordinate storage locations in yarray. Its default is 1. Example: C Draw a series of dotted lines with a spacing of 2**4 = 16 REAL XARRAY(10),YARRAY(10) CALL TRACEP (XARRAY,YARRAY,10,4,1,1) TRACEC (Draw a Series of Solid Lines - Label with Character) ------------------------------------------------------------ This routine will draw lines connecting an array of points. A specified character will be superimposed on those points that are more than kspace raster points apart, where the entire pic- ture plane is assumed to be 1024 by 1024 raster-points square. You can define kspace by calling SETPCH. The default value is 100. Note that the character may not be centered over the given point; it depends on the chosen character and its defined center. The calling sequence is: CALL TRACEC (char, xarray, yarray, num) CALL TRACEC (char, xarray, yarray, num, incx) CALL TRACEC (char, xarray, yarray, num, incx, incy) CALL TRACEC (char, xarray, yarray, num, incx, incy, 0.0) CALL TRACEC (char, xarray, yarray, num, incx, incy, 0.0, 0.0) CALL TRACEC (char, xbase, yarray, num, 0, incy, delx) CALL TRACEC (char, xbase, ybase, num, 0, 0, delx, dely) CALL TRACEC (char, xarray, ybase, num, incx, 0, 0.0, dely) CHARACTER*1 char REAL xarray(),yarray() INTEGER num INTEGER incx,incy REAL xbase,ybase REAL delx,dely The calling arguments are: char A single ascii character to be used for plot- ting. xarray An array holding the x component of the coor- dinates to draw to. The dimension must be at least (num-1)*incx+1 where incx defaults to 1 if it isn't specified otherwise. xbase A single x value which specifies the starting x when the x values are to be automatically generated. (see delx). yarray An array holding the y component of the coor- dinates to draw to. The dimension must be at least (num-1)*incy+1 where incy defaults to 1 if it isn't specified otherwise. ybase A single y value which specifies the starting y when the y values are to be automatically generated. (see dely). num The total number of coordinate to draw between. incx The increment between successive x coordinate storage locations in xarray. Its default is 1. This argument must be 0 if delx is to be used for automatically generated coordinates. incy The increment between successive y coordinate storage locations in yarray. Its default is 1. This argument must be 0 if dely is to be used for automatically generated coordinates. delx The amount to be added to xbase for generat- ing x coordinates. The first x coordinate is xbase and subsequent values are obtained by iteratively adding delx to the current x coordinate. dely The amount to be added to ybase for generat- ing y coordinates. The first y coordinate is ybase and subsequent values are obtained by iteratively adding dely to the current y coordinate. Example: C Draw a series of points with 'A' at each point farther than kspace C away. X will be 0.0,5.0,...45.0 Y will be taken from the Array. REAL YARRAY(10) CALL TRACEC ('A',0.0,YARRAY,10,0,1,5.0) SETPCH (Set Intensity, Case, Size and Spacing for POINTC and TRACEC) -------------------------------------------------------------------- This routine sets parameter that effect POINTC and TRACEC. The calling sequence is: CALL SETPCH (intensity) CALL SETPCH (intensity,icase) CALL SETPCH (intensity,icase,isize) CALL SETPCH (intensity,icase,isize,itype) CALL SETPCH (intensity,icase,isize,itype,kspace) INTEGER intensity,icase,isize,itype,kspace The calling arguments are: intensity Not Used. icase Specifies the case for characters for subse- quent calls to POINTC or TRACEC. 0 - upper case (default) 1 - lower case isize Specifies the size at which characters are to be plotted for subsequent calls to POINTC or TRACEC. 0 - miniature (default) 1 - small 2 - medium 3 - large itype The font to use in POINTC and TRACEC. This number is the character font number that GKS will use in the call to GSTXFP. If the number is invalid, it will be ignored. kspace The number of raster points apart that coor- dinates of POINTC and TRACEC must be before the specified character is plotted. The en- tire picture plane is assumed to be 1024 by 1024 raster-points square. Example: c Set case to lower, size to medium and space to 200 for next call to c POINTC or TRACEC. CALL SETPCH (0,1,2,200) TEXT PLOTTING ROUTINES ---------------------- SETLCH (Plot in the User's Coordinate Space) -------------------------------------------- This routine lets you specify the starting character posi- tion, intensity, case, size, and orientation for the next line plotted by CRTBCD, GTEXT or WRTSTR. Arguments which are omitted will not be reset. The calling sequence is: CALL SETLCH (x,y) CALL SETLCH (x,y,intensity) CALL SETLCH (x,y,intensity,icase) CALL SETLCH (x,y,intensity,icase,isize) CALL SETLCH (x,y,intensity,icase,isize,iorient) CALL SETLCH (x,y,intensity,icase,isize,iorient,itype) REAL x,y INTEGER intensity,icase,isize,iorient,itype The calling arguments are: x,y The coordinates of the next character to be plotted. These coordinates are in the users coordinate system. intensity Not Used. icase Specifies the case for future calls. 0 - upper (default) 1 - lower 2 - no case translation isize Specifies the size characters are to be plot- ted. 0 - miniature (default) 1 - small 2 - medium 3 - large iorient Specifies whether characters are to be plot- ted vertically or horizontally. Initially the orientation is horizontal. 0 - left to right (horizontal) 1 - bottom to top (vertical) itype This is the font number. This number is the character font number that GKS will use in the call to GSTXFP. If the number is in- valid, it will be ignored. Example: c Set position to 10.0,20.0 no translation, medium size, vertical c orientation and font number 11 CALL SETLCH (10.0,20.0,0,2,3,1,11) SETCH (Plot in an Absolute Grid) -------------------------------- This routine lets you specify the starting character posi- tion, intensity, case, size, and orientation for the next line plotted by CRTBCD, GTEXT or WRTSTR. Arguments which are omitted will not be reset. This routine is useful to make printer-like output. Call SETCH once to define the upper left-hand corner of a page, the character size, etc. Then subsequent calls to CRTBCD, GTEXT or WRTSTR will each begin a new line on the page. In general there are one-half as many lines/page as characters/line. This does depend on the font selected. For the default font, the following table can be used. isize Characters Lines ----- ---------- ----- 0 (miniature) 128 64 1 (small) 85 42.5 2 (medium) 64 32 3 (large) 42 21 The calling sequence is: CALL SETCH (x,y) CALL SETCH (x,y,intensity) CALL SETCH (x,y,intensity,icase) CALL SETCH (x,y,intensity,icase,isize) CALL SETCH (x,y,intensity,icase,isize,iorient) CALL SETCH (x,y,intensity,icase,isize,iorient,itype) REAL x,y INTEGER intensity,icase,isize,iorient,itype The calling arguments are: x,y The coordinates of the next character to be plotted. These coordinates are in an abso- lute grid system. The entire picture plane is assumed to be divided into rectangles, each able to hold a single character. The number and dimensions of these rectangles depends upon the current character size ant orientation. The position 1.0,1.0 refers to the lower left-hand rectangle. Coordinates may have fractional parts; thus, a string may begin anywhere in the picture plane. intensity Not Used. icase Specifies the case for future calls. 0 - upper (default) 1 - lower 2 - no case translation isize Specifies the size characters are to be plot- ted. 0 - miniature (default) 1 - small 2 - medium 3 - large iorient Specifies whether characters are to be plot- ted vertically or horizontally. Initially the orientation is horizontal. 0 - left to right (horizontal) 1 - bottom to top (vertical) itype This is the font number. This number is the character font number that GKS will use in the call to GSTXFP. If the number is in- valid, it will be ignored. Example: c Set position to 10.0,20.0 no translation, medium size, vertical c orientation and font number 11 CALL SETCH (10.0,20.0,0,2,3,1,11) CRTBCD (Plot an ASCII String) ----------------------------- Plot an ascii string. This routine was designed to be used with characters packed into an integer array. Text plotting should be done with the GTEXT routine. The calling sequence is: CALL CRTBCD (istring) CALL CRTBCD (istring,num) INTEGER istring(*) INTEGER num The calling arguments are: args An array holding packed characters. num The number of words in the array. The size of a word is 8. So 8*num characters will be plotted. Example: c Plot 'hello' INTEGER I I = 'hello' CALL CRTBCD (I,1) WRTSTR (Write strings) ---------------------- This was designed to be a substitute for WRITE 100. It will simply let you pass a number of strings. It will loop through the strings and draw them on the display device. The calling sequence is: CALL WRTSTR (STRING,NUM) CHARACTER*(*) STRING[NUM] INTEGER NUM The calling arguments are: STRING An array or strings. NUM The number of strings that are in STRING. (The length of the array) Example: CHARACTER*80 STRING[5] ... WRITE (STRING,10) 1,2,3,4,5 10 FORMAT (' string: ',i2/' string: ',i2/' string: ',i2/ + ' string: ',i2/' string: ',i2) CALL WRTSTR (STRING,5) GTEXT (Plot an 8-bit ASCII String) ---------------------------------- This will allow the plotting of 8 bit ascii text. The starting point of the text depends upon your last call to SETLCH. The calling sequence is: CALL GTEXT (text,icount) CALL GTEXT (text,icount,ioffset) CHARACTER*(*) text INTEGER icount,ioffset The calling arguments are: text An array of character to plot icount The number of characters in the string ioffset The zero origin character offset to the text. The default is 0. Example: c Plot a string CALL GTEXT ('hello world',11,0) SHADING ROUTINES ---------------- HATCH (Shade a general polygon) ------------------------------- HATCH will properly shade any polygon of up to 100 sides. The polygon need not be convex or even simple (i.e., it can have holes). The ertices are passed as arrays of (x,y)-coordinates and the shading is specified with an angle. If more than 100 vertices are supplied to HATCH it will re- turn without doing anything. This limit can be raised, but only if sufficient internal storage is supplied to HATCH. The follow- ing statements should be placed within the main program. COMMON /HATCHCOM0/ NMAX COMMON /HATCHCOM1/ DUMMY1(newsize) COMMON /HATCHCOM2/ DUMMY2(newsize) COMMON /HATCHCOM3/ DUMMY3(newsize) NMAX = newsize The calling sequence is: CALL HATCH (xlist,ylist,n,angle,k,mode) REAL xlist(n),ylist(n) INTEGER n REAL angle INTEGER k,mode The calling arguments are: xlist An array of x-coordinates for the vertices of the boundary. If any particular x-coordinate is an indefinite (an illegal value under normal circumstances) the corresponding (x,y) pair is not treated as a vertex, but rather it is considered a sentinel marking the beginning of a new, disconnected piece of the boundary. The vertices within each piece of the boun- dary are connected, in order, by edges; an additional edge from the last vertex to the first vertex within each piece of the boun- dary is also added, closing that piece. ylist an array of y-coordinates for the vertices of the boundary. No check is made for indefin- ites with ylist. n The number of vertices on the boundary of the polygonal region, including any of the inde- finites (sentinels). n is restricted to be within the range 3 .LE. n .LE. 100. angle The angle, in radians (not degrees), of the shading. All shading lines or rows of points will be at this angle. k The spacing of the points or lines used for shading. If k .GE. 0 the points or lines are spaced 2**k raster points apart; if k .LT. 0 they are spaced ABS(k) raster points apart. The entire picture plane is assumed to be a square composed of 1024 x 1024 raster points. mode A flag which determines the type of shading. It may assume the following values (all oth- ers are illegal and will produce unspecified results). -1 - do not shade, draw the boundary. 0 - shade with lines, do not draw boundary. 1 - shade with points, do not draw the boundary. 2 - shade with lines and also draw the boundary. 3 - shade with points and also draw the boundary. Example: c Shade the polygon specified by XLIST,YLIST with points on a line with c the distance between lines at a distance of 2^3 = 8 points placed at c an angle of 60 degrees (PI/3) CALL HATCH (XLIST,YLIST,5,3.14159/3,3,1) DRAW AN ARROW ------------- PLOTV (Draw an Arrow) --------------------- This routine will draw an arrow. The arrowhead can be ei- ther fixed length or proportional to the length of the tail of the arrow. The calling sequence is: CALL PLOTV (x1,y1,x2,y2) CALL PLOTV (x1,y1,x2,y2,h) REAL x1,y1 REAL x2,y2 REAL h The calling arguments are: x1,y1 The coordinates of the tail of the arrow. x2,y2 The coordinates of the head of the arrow. h The size of the arrowhead in the range of 0.0 to 1.0. If h is omitted, the arrowhead will be proportional to the length of the vector. Example: c draw an arrow from 10.0,20.0 to 11.0,21.0 CALL PLOTV (10.0,20.0,11.0,21.0,0.2) CONTOUR PLOTTING ROUTINES ------------------------- Four routines are available for contour plotting. Before any of these routines are called, all necessary frame advances and mapping routines should be called. The contour-plotting rou- tines are: CONTUR General contour plot. RCONTR Contour plot, rectangular grid. ACONTR Contour plot, equally spaced rectangular grid. LCURVS Contour plot with function. The first three arguments in the calling sequences of each of these routines are k1, c, and k2. These arguments determine the level lines (contour values) to be plotted. Three plotting options are available in each of the rou- tines. The plotting option is selected by the value of k1. (1) k1 .GT. 0: -------------- If k1 is greater than 0, then the array c contains k1 numbers to be used as test values for plotting the level lines, fcn(x,y) = c(i). Those contours c(i) with i less than k2 are plotted as a series of dots, while those with i greater than or equal to k2 are plot- ted as solid lines. (2) k1 .LT. 0: -------------- If k1 is less than 0, then -k1 equally spaced test values between c(1) and c(2), inclusive, are generated and placed in c as output. The numbers are stored in order, with c(1) remaining unchanged and new c(-k1) = old c(2). Plotting then proceeds as described above. (3) k1 .EQ. 0: -------------- If k1 is equal to 0, then f0 = c(1), df = c(2), and all level curves of the form fcn(x,y) = f0 + m * df (m is an integer) are plotted (providing they pass through the grid). Those con- tours less than c(1) are plotted as a series of dots, while those greater than or equal to c(1) are plotted as solid lines. In this case, k2 is ignored. Note that an error exit is taken if c(2) is less than or equal to 0 for this option. CONTUR (General Contour Plot) ----------------------------- CONTUR allows the user to specify arbitrary (curvilinear) coordinate arrays that divide the x,y-plane into a grid of qua- drilaterals. The two-dimensional arrays are x2 and y2. If fcn is the function whose level curves (contours) are to be drawn, CONTUR assumes that a(i,j) = fcn(x2(i,j), y2(i,j)). The arrays x2,y2 must be set up so that the four points (x2(i,j),y2(i,j)) (x2(i,j+jstep),y2(i,j+jstep)) (x2(i+istep,j+jstep),y2(i+istep,j+jstep)) (x2(i+istep,j),y2(i+istep,j)) define a quadrilateral, for any legal choice of (i,j) within the limits imin,imax and jmin,jmax. All three arrays (a, x2, y2) must have the same structure. That is, the same number of rows must be specified for each array in the DIMENSION statement, and the number of rows must be equal to the value of max in the argument list. The calling sequence is: CALL CONTUR (k1,c,k2,a,max,x2,imin,imax,istep,y2,jmin,jmax,jstep) INTEGER k1,k2 REAL c REAL a INTEGER max REAL x2,y2 INTEGER imin,imax,istep INTEGER jmin,jmax,jstep The calling arguments are: k1,k2 The integer variables that determine which plotting option is to be used. c A one-dimensional floating-point array of test values for level curves. a A two-dimensional floating-point array of function values. max An integer variable that represents the max- imum row dimension (the first number in the DIMENSION statement for a). x2,y2 Two-dimensional floating-point arrays that define the coordinatization of the x,y-plane. imin An integer variable that represents the minimum i value. imax An integer variable that represents the max- imum i value. istep An integer variable that represents the in- crement between successive i values. jmin An integer variable that represents the minimum j value. jmax An integer variable that represents the max- imum j value. jstep An integer variable that represents the in- crement between successive j values. Example: c Draw 5 contour lines, everthing at and above C(2) are solid lines. c Points in A are at the quadrilateral boundaries defined by X,Y DIMENSION A(6,6),C(5),X(6,6),Y(6,6) CALL RCONTR (5,C,2,A,6,X,1,6,1,Y,1,6,1) RCONTR (Contour Plot, Rectangular Grid) --------------------------------------- RCONTR allows the user to specify rectangular coordinate ar- rays for the x,y-plane (specified by the one-dimensional arrays x and y). If fcn is the function whose level curves (contours) are to be drawn, RCONTR assumes that a(i,j) = fcn(x(i),y(j)). The calling sequence is: CALL RCONTR (k1,c,k2,a,max,x,imin,imax,istep,y,jmin,jmax,jstep) INTEGER k1,k2 REAL c REAL a INTEGER max REAL x,y INTEGER imin,imax,istep INTEGER jmin,jmax,jstep The calling arguments are: k1,k2 The integer variables that determine which plotting option is to be used. c A one-dimensional floating-point array of test values for level curves. a A two-dimensional floating-point array of function values. max An integer variable that represents the max- imum row dimension (the first number in the DIMEN- SION statement for a). x,y The one-dimensional floating-point arrays that define a rectangular grid in the x,y-plane. imin An integer variable that represents the minimum i value. imax An integer variable that represents the max- imum i value. istep An integer variable that represents the in- crement between successive i values. jmin An integer variable that represents the minimum j value. jmax An integer variable that represents the max- imum j value. jstep An integer variable that represents the in- crement between successive j values. Example: c Draw 5 contour lines, everthing at and above C(2) are solid lines. c Points in A are at the rectangle boundaries defined by X,Y DIMENSION A(6,6),C(5),X(6),Y(6) CALL RCONTR (5,C,2,A,6,X,1,6,1,Y,1,6,1) ACONTR (Contour Plot, Equally Spaced Rectangular Grid) ------------------------------------------------------ ACONTR plots level curves (contours) defined by a(i,j) = c, where the subscripts (i,j) are independent variables. Using ACONTR is equivalent to using RCONTR with the equally spaced grid x(i) = i, y(j) = j. The values of xmin,xmax and ymin,ymax given in the CALL MAP statement executed prior to the current CALL ACONTR statement must satisfy the conditions: xmin .LE. imin .LE. imax .LE. xmax, ymin .LE. jmin .LE. jmax .LE. ymax. The calling sequence is: CALL ACONTR (k1,c,k2,a,max,imin,imax,istep,jmin,jmax,jstep) INTEGER k1,k2 REAL c REAL a INTEGER max INTEGER imin,imax,istep INTEGER jmin,jmax,jstep The calling arguments are: k1,k2 The integer variables that determine which plotting option is to be used. c A one-dimensional floating-point array of test values for level curves. a A two-dimensional floating-point array of function values. max An integer variable that represents the max- imum row dimension (the first number in the DIMENSION statement for a). imin An integer variable that represents the minimum i value. imax An integer variable that represents the max- imum i value. istep An integer variable that represents the in- crement between successive i values. jmin An integer variable that represents the minimum j value. jmax An integer variable that represents the max- imum j value. jstep An integer variable that represents the in- crement between successive j values. Example: c Draw 5 contour lines, everthing at and above C(2) are solid lines. DIMENSION A(6,6),C(5) CALL ACONTR(5,C,2,A,6,1,6,1,1,6,1) LCURVS (Contour Plot With Function) ----------------------------------- LCURVS generates a rectangular grid internally, using the values of xmin,xmax and ymin,ymax from the CALL MAP statement that is divided into boxes of dimension dx by dy, where dx = (xmax - xmin) / nx, dy = (ymax - ymin) / ny. As they are needed, function values are obtained directly by calling the function f(x,y), so that no arrays are needed at all. f will be called 2 * ny * (nx + 1) times. Any function name used as an actual argument for f must ap- pear in an EXTERNAL statement in the program that calls LCURVS. For example, the following EXTERNAL declaration and LCURVS call belong in the user's invoking program. The calling sequence is: CALL LCURVS (k1,c,k2,f,nx,ny) INTEGER k1,k2 REAL c EXTERNAL f INTEGER nx,ny The calling arguments are: k1,k2 The integer variables that determine which plotting option is to be used. c A one-dimensional floating-point array of test values for level curves. f The name of a function f(x,y) whose level curves are to be plotted. nx An integer variable that represents the number of subintervals along the x-axis. ny An integer variable that represents the number of subintervals along the y-axis. Example: EXTERNAL funct CALL LCURVS (k1,c,k2,funct,nx,ny) PICTUREC (3-D Surface Plotting) ------------------------------- This is an unsupported, enhanced 3-D surface-plot routine (performing hidden-line removal) obtained from Los Alamos Nation- al Laboratory. PICTUREC requires 40 arguments. The calling sequence is: CALL PICTUREC (f,nx,ny,nxd,x,y,xvu,yvu,zvu,xh,yh,ns,ba,rf,sy,sz, lhide,lbox,label,char,nint,lbar,lsurf,line,colr,nadv,win,center, npass,ne,fmin,fmax,xe,ye,ze,ce,nch,nec,ie,net) The calling arguments are: f Array f(nx,ny) contains data to be plotted. nx,ny Dimensions of array to be plotted. nxd The value of the first index of f in the DI- MENSION statement of the calling program. This may be different than nx when the caller is not using its full array. x A vector of length nx giving the x coordi- nates of the mesh lines. It must be monoton- ically increasing. y A vector of length ny giving the y coordi- nates of the mesh lines. It must be monoton- ically increasing. xvu,yvu,zvu The viewing position in the same units as x, y, and f, respectively. The viewpoint must be outside the grid area. xh,yh,ns Temporary storage arrays, each of size ns. ns should be at least 5*(nx+ny). If lines run in one direction only and point away from the viewer, this number should be larger (perhaps 2*nx*ny). ba Level of base of the box in the same units as f. rf Level of roof of the box in the same units as f. If rf = ba, only the base is plotted. sy A scale factor to scale y, center(2), and yv (multiplies y by sy to make y appropriate to x). Normally, use sy = 1.0. sz The scale factor for f, zv, ba, rf, and center(3). It scales f (multiplies f by sz) so that the surface features are of appropri- ate size for the width of the plot. If sz = 0, a suitable scale is chosen by PICTUREC. lhide Determines the type of hidden lines to be re- moved. 0 - no lines are removed. 1 - all hidden surface lines are removed. 2 - hidden surface lines and hidden box lines are removed. lbox Specifies how the box will be plotted. 0 - the box is not plotted. 1 - plots the base. 2 - plots the base and z-axis. 3 - plots the box. 4 or 5 - horizontal lines will be drawn on walls of the box corresponding to the tick marks (see nint below). 5 - only background horizontal lines will be drawn. label Specifies when axis labels will be written. 0 - no axis labels are written. 1 - labels axis when centers of labels are visible. 2 - labels axis even when invisible. char (array of 3) defines axis labels with up to 8 characters/label. When char(i) = 0, the i-th axis is labeled with the appropriate x, y, or z. (Example: set char(2) = 4Htime to la- bel y-axis with the four-character string "time".) nint (array of 3) gives the number of intervals for tick marks and tick labels on the x,y,z axis. For example, 1 - numbers representing the magnitude of the base and roof, and tick marks are placed to the left of the box. 2 - three tick marks and numbers (two inter- vals) are placed at left, etc. 3 - no ticks are given on the z-axis. For the x and y axis, the ticks are provided only when the axis is in the foreground. If nint is negative, tick marks are em- placed, but tick labels are not. When nint or label is nonzero, the plot is made smaller so that there is room for the numbers or labels. lbar Specifies the side bars to be plotted. 0 - the side bars are not plotted. 1 - visible nonobscuring side bars are plot- ted. 2 - all visible side bars are plotted. 3 - only visible side bars going down from top surface to base and up from bottom surface to base are plotted. lsurf Determines which surfaces are to be plotted. 1 - top surface is plotted. 2 - bottom surface is plotted. 3 - both surfaces are plotted. line Determines which lines will be plotted. 1 - only lines running in the x direction are plotted. 2 - only lines running in the y direction are plotted. 3 - lines running in both directions are plotted. colr (1-D array of four words) The four words de- fine, respectively, the color of the top sur- face, underside, side bars, and box. If npass (see below) is not zero, colr is used differently. The color code is: 0.0 (or any number .GE. 0.0 .AND. .LT. 0.5) white 1.0 (or any number .GE. 0.5 .AND. .LT. 1.25) red 1.5 (or any number .GE. 1.25 .AND. .LT. 1.75) yellow 2.0 (or any number .GE. 1.75 .AND. .LT. 2.25) green 2.5 (or any number .GE. 2.25 .AND. .LT. 2.75) cyan 3.0 (or any number .GE. 2.75 .AND. .LT. 3.25) blue 3.5 (or any number .GE. 3.25 .AND. .LT. 3.75) magenta For higher values, the colors are cyclic mod 4. That is, 3.75 to 4.25 gives red, etc. If colr(1) = -1, no color is plotted. nadv The number of frames to be advanced after plotting. Use 0 to prevent advancing. For making duplicate frames when npass is nonzero (see npass below), set nadv to the negative of the number of frames wanted, and set nbuf sufficiently large (see nbuf below). Features such as labels are not duplicated on the duplicate frames. win,center (in the same units as x) gives the width/height of window (area) to be plotted. Lines outside window are cut off. Window is centered at x,y,z coordinates given by center(1), center(2), and center(3). The window is per- pendicular to the base, and it faces the viewer. If win is less than or equal to zero, center is not used. If win = 0, the window is made just large enough to fit the image (including the box, even if lbox = 0). If win = -1, the plot fills the frame (some distortion occurs). npass,ne,fmin,fmax gives the number of passes to make in order to plot different parts of the surface in different colors. The parts to be plotted in each pass are defined by fmax and fmin or by the integers set in f (see instructions below). If npass = 0, fmin and fmax are not checked. If npass is not zero, a buffer lbuf of length nbuf must be supplied in labeled common (COMMON/TVCDR/nbuf,lbuf); suggested buffer size is 2.5*nx*ny. If the buffer is too small, the color filter will have to change excessively. When npass is nonzero, 13 colors are possible. Colors intermediate to those listed above are produced by using intermediate numbers. If npass = 0 and ne = 0, all arguments fol- lowing ne may be omitted. fmax, fmin, and colr are arrays of length up to 15. fmax and fmin set the limits of the portion of the array to be plotted. (Exam- ple: fmax(1) = 10.0, fmin(1) = 0.0, colr(1) = 1.0; then all portions of the surface lying between f = 0 and f = 10 will be plotted red.) When npass is nonzero, the colors of the sidebars and box (when requested) are defined by the last two passes, respectively. If selected segments are to be plotted in dif- ferent colors, use the following procedure: set npass to the negative of the number of colors wanted, and set colr to the appropri- ate colors. The four lowest-order bits of f(i,j) deter- mine in which pass to plot the segment between (i-1,j) and (i,j), where i is the x coordinate index and j is the y coordinate index. The four next lowest-order bits determine in which pass to plot the segment between (i,j-1) and (i,j). (Example: colr(3) = 1.5 will actuate the yellow filter for the third pass. All segments for which the f bits are set to integer 3 are colored yellow. To set the bits to 3 for both segments of the point (i,j), zero out the eight lowest-order bits by the Fortran statement f(i,j) = f(i,j) .AND. .NOT. 377B, and then reset the bits with the statement f(i,j) = f(i,j) .OR. SHIFT(3,4) .OR. 3.) fmax and fmin will also be checked when npass is negative. If this is not desired for a particular pass, set fmax = 0 and fmin = 0. Setting f bits to 0 causes the corresponding segment to be skipped. If extra points are to be plotted, set ne to the number of extra points. xe,ye,ze,ce Extra-points coordinates, where xe, ye, and ze are in the same units as x, y, and f, respectively. If ne = 0, all arguments fol- lowing fmax need not be given in the call. ce is color for each extra point (set all ce = -1 for no color). nch The plotting character for each extra point. nec,ie,net Temporary arrays used for the extra points whose lengths are at least the larger of ne or nx+ny. If nch(i) = 0, a line will connect the i-th point to the next point provided both points are visible. --------------------------------- APPENDIX TO TV80GKS DOCUMENTATION --------------------------------- EXAMPLE PROGRAMS ---------------- PROGRAM 1: Simple initialization -------------------------------- This program gives an example of a simple initialization, drawing and frame forwarding. PROGRAM PROG1 C C This program sends pictures to successive frames. CALL DROPFILE(0) C C Initialize the CGM metafile binary output driver CALL CGMBIN (1,'cgmb.out') CALL MAP(1.,1024.,1.,1024.) C C Draw a picture on the first frame. CALL LINE(1.,1.,1024.,1024.) CALL LINE(1.,1024.,1024.,1.) C C Label the picture on the first frame. CALL SETLCH(100.,200.,1,0,3) CALL CRTBCD('HERE IS MY LABEL',2) C C Close the first frame. CALL FRAME C C Draw a picture on the second frame. CALL LINE(212.,97.,1000.,672.) CALL VECTOR(28.,672.) CALL VECTOR(812.,97.) CALL VECTOR(512.,1024.) CALL VECTOR(212.,97.) C C Label the picture on the second frame. CALL SETLCH(400.,100.,1,0,3) CALL CRTBCD('THIS IS A STAR',2) C C Close the second frame. CALL FRAME C CALL PLOTE CALL EXIT END PROGRAM 2: GAXIS ---------------- This program gives an example of the use of GAXIS. PROGRAM PROG2 C C This is an example program showing different ways in which GAXIS C may be called. DIMENSION DIV1(7),IDIV2(6),DIV3(2),DIV4(2) DATA (DIV1="JAN","FEB","MAR","APR","MAY","JUN","JUL") DATA (IDIV2=1,5,6,7,15,16),(DIV3=-8.,8.),(DIV4=.01,.09) CALL DROPFILE(0) C C Initialize the Postscript output driver CALL POST1 (1,'out.ps') CALL MAP(0.,10.,0.,10.) C C Text labeling. CALL GAXIS(1.5,1.5,8.5,1.5,1,1,0,"a3",-7,DIV1) C C Specified values for the labels. CALL GAXIS(1.5,3.,8.5,3.,1,0,1,"i3",-6,IDIV2) C C Nice-numbered labels. CALL GAXIS(1.5,4.5,8.5,6.,1,1,1,"f5.1",0,DIV3) C C Nine labels. CALL GAXIS(9.5,9.5,9.5,.5,0,1,0,"e8.1",9,DIV4) C C Horizontal text with a horizontal axis. CALL GAXIS(1.5,9.,8.5,9.,0,1,0,"a3",-7,DIV1) C C Vertical text with a vertical axis. CALL GAXIS(.5,1.5,.5,8.5,1,0,1,"o3",-6,IDIV2) CALL FRAME C CALL PLOTE CALL EXIT END PROGRAM 3: POINT PLOTTING ------------------------- This program gives an example of how to use the point plot- ting routines and it gives an example of the various types of mapping that are available. PROGRAM PROG3 C DIMENSION X(200) DIMENSION Y1(200),Y2(200),Y3(200),Y4(200),Y5(200) DIMENSION XMI(12),XMA(12),YMI(12),YMA(12) C DATA XMI/.05,.3,.55,.8,.05,.3,.55,.8,.05,.3,.55,.8/ DATA XMA/.2,.45,.7,.95,.2,.45,.7,.95,.2,.45,.7,.95/ DATA YMI/.25,.25,.25,.25,.5,.5,.5,.5,.75,.75,.75,.75/ DATA YMA/.45,.45,.45,.45,.7,.7,.7,.7,.95,.95,.95,.95/ C CALL DROPFILE(0) C C Initialize the Tektronix 4010 output driver CALL T4010 (1,'tek.out') C C DDERS is called to turn on the clipping facility. CALL DDERS(-1) C C The following loop fills in the y arrays with sin and cos C curves. DO 50 I=1,200 X(I)=0.01*I*3.14159 Y1(I)=SIN(X(I))*0.3 + 2.6 Y2(I)=Y1(I) - 0.3 Y3(I)=Y2(I) - 0.3 Y4(I)=Y3(I) - 0.3 Y5(I)=Y4(I) - 0.3 50 CONTINUE C C Set character size and spacing of TRACEC and POINTC. CALL SETPCH(0,0,0,11,16) C C Draw the basic curves with basic mapping and no grid. CALL MAP(0.2,7.2,1.0,3.0,0.12,1.,0.285,1.) CALL POINTS(X,Y1,50,4,4) CALL POINTC(1HP,X,Y2,50,4,4) CALL TRACE(X,Y3,50,4,4) CALL TRACEC(1HT,X,Y4,50,4,4) CALL TRACEP(X,Y5,50,3,4,4) C C Label the curves with SETLCH and CRTBCD. CALL SETLCH(6.45,2.55,0,0,1,0) CALL CRTBCD(6HPOINTS) CALL SETLCH(6.45,2.25) CALL CRTBCD(6HPOINTC) CALL SETLCH(6.45,1.95) CALL CRTBCD(5HTRACE) CALL SETLCH(6.45,1.65) CALL CRTBCD(6HTRACEC) CALL SETLCH(6.45,1.35) CALL CRTBCD(6HTRACEP) CALL FRAME C C Now go through the steps above for all possible mappings C using MAPX. DO 100 I=2,12 CALL MAPX(I,0.2,7.2,1.0,3.0,0.12,1.,0.285,1.) CALL POINTS(X,Y1,50,4,4) CALL POINTC(1HP,X,Y2,50,4,4) CALL TRACE(X,Y3,50,4,4) CALL TRACEC(1HT,X,Y4,50,4,4) CALL TRACEP(X,Y5,50,3,4,4) CALL SETLCH(6.45,2.55,0,0,1,0) CALL CRTBCD(6HPOINTS) CALL SETLCH(6.45,2.25) CALL CRTBCD(6HPOINTC) CALL SETLCH(6.45,1.95) CALL CRTBCD(5HTRACE) CALL SETLCH(6.45,1.65) CALL CRTBCD(6HTRACEC) CALL SETLCH(6.45,1.35) CALL CRTBCD(6HTRACEP) CALL FRAME 100 CONTINUE C C Now put all the frames on one page. DO 200 I=1,12 CALL MAPX(I,0.2,7.2,1.0,3.0,XMI(I),XMA(I),YMI(I),YMA(I)) CALL POINTS(X,Y1,50,4,4) CALL POINTC(1HP,X,Y2,50,4,4) CALL TRACE(X,Y3,50,4,4) CALL TRACEC(1HT,X,Y4,50,4,4) CALL TRACEP(X,Y5,50,3,4,4) CALL SETLCH(6.45,2.55,0,0,1,0) CALL CRTBCD(6HPOINTS) CALL SETLCH(6.45,2.25) CALL CRTBCD(6HPOINTC) CALL SETLCH(6.45,1.95) CALL CRTBCD(5HTRACE) CALL SETLCH(6.45,1.65) CALL CRTBCD(6HTRACEC) CALL SETLCH(6.45,1.35) CALL CRTBCD(6HTRACEP) 200 CONTINUE CALL PLOTE CALL EXIT END PROGRAM 4: ACONTR ----------------- This program gives an example of the use of ACONTR. PROGRAM PROG4 C C This is a simple test program to illustrate the results obtained C when varying the k1 and k2 variables while calling the ACONTR C subroutine. DIMENSION A(6,6),C(6) CALL DROPFILE(0) C C Initialize the point plot 35mm slide output driver CALL DICO3 (1,'c00-KEEP') C C Define four peaks. A(2,2) = A(5,2) = A(2,5) = A(5,5) = 2. C C Five values will be used from the C array. C Contour lines at 0.1 will be plotted as dotted lines. K1 = 5 K2 = 2 C(1) = 0.1 C(2) = 0.5 C(3) = 0.9 C(4) = 1.3 C(5) = 1.7 CALL MAPS(1.,6.,1.,6.,.1,.5,.6,1.) CALL ACONTR(K1,C,K2,A,6,1,6,1,1,6,1) C C Eight equally spaced contour lines will be drawn between 0.1 and 1.9. K1 = -8 K2 = 0 C(1) = 0.1 C(2) = 1.9 CALL MAPG(1.,6.,1.,6.,.6,1.,.6,1.) CALL ACONTR(K1,C,K2,A,6,1,6,1,1,6,1) C C The contour routine will plot lines that are 0.2 units apart, C starting at a base value of 0.971. K1 = 0 C(1) = 0.971 C(2) = 0.2 CALL MAPS(1.,6.,1.,6.,.6,1.,.1,.5) CALL ACONTR(K1,C,K2,A,6,1,6,1,1,6,1) CALL SETCH(13.,12.,0,0,1) CALL CRTBCD("THE ACONTR SUBROUTINE",3) CALL FRAME CALL PLOTE C CALL EXIT END PROGRAM 5: HATCH ---------------- This program gives an example of the use of the HATCH rou- tines. The output file will contain an area filled with points surrounded by a solid line. PROGRAM PROG5 C C Declare coordinates for vertices of a pentagon. REAL XLIST(5), YLIST(5) DATA(XLIST = 10.0,20.0,2.0,60.0,55.0) DATA(YLIST = 2.0,18.0,15.0,2.0,12.0) CALL DROPFILE(0) C C Initialize the HDF 320x200 8 bit output driver CALL HDF1 (1,'out.hdf') CALL MAP(0.0,60.0,0.0,60.0) C C Shade the interior of the pentagon with points so that the C shading makes a 60-degree angle. The grid spacing is C every eight points (128 across the entire screen). CALL HATCH(XLIST,YLIST,5,3.14159/3,3,.TRUE.) C C Draw the boundary of the polygon. DO 100 I=1,5 CALL LINE (XLIST(I),YLIST(I),XLIST(MOD(I,5)+1),YLIST(MOD(I,5)+1)) 100 CONTINUE C C All done. CALL FRAME C CALL PLOTE CALL EXIT END PROGRAM 6: PICTUREC ------------------- This program illustrates the use of the PICTUREC routine. PROGRAM PROG6 C C The array F contains the data to be plotted. C The arrays X and Y are used as work space by PICTUREC. C The arrays XTEMP, YTEMP, are temporary storage for PICTUREC. DIMENSION SARR(40) DIMENSION F(40,40), 1 X(40), Y(40), 2 XTEMP(1600), YTEMP(1600) C DIMENSION CHAR(3), NINT(3), COLR(3), CENTER(3) C DIMENSION FMIN(15), FMAX(15) COMMON/CDR/NBUF,LBUF(4000) DATA NBUF/4000/ DATA NFRAMES/3/ C C Getting started. CALL DROPFILE(0) C C Identify that it's an FR80 color slide to be kept on disk. CALL FR80DPC (1,'c00-KEEP') C CALL MAP(0.0,1023.0,0.0,1023.0,0.0,1.0,0.25,1.0) C C Set the size of the array for PICTUREC. NX = 40 NY = 40 NXD = 40 NS = 1600 C C X and Y vectors must be supplied for the width of the plot. X(1) = 1.0 Y(1) = 1.0 DO 5 I=2,NX X(I) = X(I-1) + 1.0 5 CONTINUE DO 7 I=2,NY Y(I) = Y(I-1) + 1.0 7 CONTINUE C C Set the level of the base and roof. BASE = -10.0 ROOF = 10.0 C C Set the scale factor for Y, F, ZVU, BASE, ROOF, and CENTER. SCALY = 1.0 SCALZ = 1.0 C C Set the flags for ... LHIDE = 2 LBOX = 3 LABEL = 2 C C The i-th axis is labeled with the appropriate x, y, or z. C LABEL is set for no axis labels written, so CHAR does not need to C be defined. CHAR(1) = 0 CHAR(2) = 0 CHAR(3) = 0 C C The number of intervals for tick marks and tick labels on x,y,z C axis are all set for no ticks. NINT(1) = 0 NINT(2) = 0 NINT(3) = 0 C C Set the flags for ... LBAR = 0 LSURF = 3 LINE = 3 C C Colors added. COLR(1) = 3.5 COLR(2) = 2.0 COLR(3) = 3.0 COLR(4) = 1.5 C C Number of frames to advance. NADV = 1 C C The window is centered at x,y,z coordinates given by C CENTER(1), etc. If WINDOW=0, CENTER is not used. It will C calculate its own center. The window is made just large C enough to fit the image. WINDOW = 0.0 CENTER(1) = 0.0 CENTER(2) = 0.0 CENTER(3) = 0.0 C C Set the flag for ... NPASS = 0 NE = 0 C FMIN(1) = -20.0 FMAX(1) = -10.0 FMIN(2) = -9.0 FMAX(2) = 0.0 FMIN(3) = 0.0 FMAX(3) = 9.0 FMIN(4) = 10.0 FMAX(4) = 20.0 C C Set the viewing position to move in a circle. PI = 3.1415926 IDEGREE = 0 RADIANS = 0.0 RADIUS = 50.0 C C The Equation for the surface. DO 9 I=0,NX-1 SARR(I) = SIN (I*2.*PI / 39.) 9 CONTINUE DO 10 I=1,NX DO 10 J=1,NY F(I,J) = 10. * SARR(I)*SARR(J) 10 CONTINUE C C Ready to call. DO 20 I=1,NFRAMES C C Rotate about the z-axis (the center of the circle is 20.5). XVU = RADIUS * COS(RADIANS) + 20.5 YVU = RADIUS * SIN(RADIANS) + 20.5 ZVU = 20.0 C C Print the surface rotation angle. CALL ZCITOA(IDEG,0,IDEGREE,3,0) CALL SETLCH(900.0,20.0,1,0,3,0) CALL CRTBCD(IDEG,1) C C Plot the 3-D surface. CALL PICTUREC(F,NX,NY,NXD,X,Y, 1 XVU,YVU,ZVU,XTEMP,YTEMP,NS, 2 BASE,ROOF,SCALY,SCALZ, 3 LHIDE,LBOX,LABEL,CHAR, 4 NINT,LBAR,LSURF,LINE,COLR, 5 NADV,WINDOW,CENTER,NPASS,NE, 6 FMIN,FMAX) C IDEGREE = IDEGREE + 30 RADIANS = IDEGREE * PI / 180.0 C 20 CONTINUE C CALL PLOTE CALL EXIT END CONVERTING FROM TV80LIB ----------------------- 1. Replace all WRITE 100's with internal writes and calls to WRTSTR. See the WRTSTR routine specification. 2. Either make certain your call to FR80ID uses one of the GKS supported camera types, or convert your ID routine to one of the calls to the workstation initialization routines. 3. Omit calls to FR80 specific routines within TV80LIB. See the DIFFERENCES FROM TV80LIB. 4. Make certain your program calls PLOTE when it exits. There will be information in buffers that will need to be dumped. If PLOTE is not called, information will be lost or your output may not even be created. Differences from tv80lib ------------------------ All routines that were dependent on the CDC were omitted. CARTMM This was a routine for DD80 support. It should not be called. COLOR This currently takes the same arguments as the TV80LIB. However, the code should pass an integer rather than a string for portability and efficiency reasons. COLORSORT Told FR80 driver that the code was color sorted. Not imple- mented. DDERS Clipping is not done in the TV80LIB projection style. This sort of clipping simply moved the point to the nearest valid point. This generates strange looking erroneous results. Clipping is either done at the viewport and then the works- tation viewport, or just at the workstation viewport. If this is confusing, simply think of clipping done in TV80GKS as being done in the area you have specified for your map or at the entire window based on whether clipping is on or off. FR80ID The call to FR80ID is still in existence, but it only sup- ports camera types number 2 (35 mm slide) and 8 (35 mm film). You should call one of the workstation initializa- tion routines. Ideally it shouldn't exist. If you want your file to be kept or given away by the system, you have to call KEEP80 before you call this routine. FR8COD Sent FR80 code. Not implemented. GBUF Reassigned buffer. All buffers are internal to GKS. Not implemented. GFSIZE You should not be using this routine even in TV80LIB. GTABLS The internal TV80 tables no longer exist. This is not im- plemented. KEEP80 This routine isn't necessary if you are calling one of the workstation initialization routines. Ideally it should not exist. If you are using FR80ID you have to call KEEP80 be- fore FR80ID in order for KEEP80 to have any effect. NOMAP Allowed user to plot directly into TV80's coordinate system. Not implemented. PLOTE The old PLOTE was not always necessary. Calls to EXIT would flush the buffers. YOU MUST CALL PLOTE for your buffered output to be dumped by the library and GKS. REFOCO Repeat FR80 command. Not implemented. SETMUL SETMUL was dependent upon the FR80 drivers with a coordinate system that is not compatible with other devices. It is not implemented. TEKID Doesn't exist. Use one of the workstation initialization routines. WRITE OUTPUT TAPE 100 The WRITE 100 is an extension made to FORTLIB. It can't be implemented efficiently. A new routine call WRTSTR has been added. This can be used as a substitute. Workstation initialization routines ----------------------------------- POST1 (8.5 x 11 inch Postscript Portrait) ----------------------------------------- Creates an 8.5 x 11 inch Postscript file in Portrait format. The calling sequence is: CALL POST1 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This is the out- put file name that will be generated by GKS. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL POST1 (1,'OUT.PS') POST2 (8.5 x 11 inch Postscript Landscape) ------------------------------------------ Creates an 8.5 x 11 inch Postscript file in Landscape for- mat. The calling sequence is: CALL POST2 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This is the out- put file name that will be generated by GKS. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL POST2 (2,'OUT.PS') POST3 (11.0 x 14.0 inch Postscript Portrait) -------------------------------------------- Creates an 11.0 x 14.0 inch Postscript file in Portrait for- mat. The calling sequence is: CALL POST3 (IWKID,CONNID) CHARACTER*8 CONNID IWKID The calling arguments are: CONNID The connection identifier. This is the out- put file name that will be generated by GKS. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL POST3 (3,'OUT.PS') POST4 (11.0 x 14.0 inch Postscript Landscape) --------------------------------------------- Creates an 11.0 x 14.0 inch Postscript file in Landscape format. The calling sequence is: CALL POST4 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This is the out- put file name that will be generated by GKS. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL POST4 (4,'OUT.PS') FR80C35 (FR80 35mm color film) ------------------------------ Creates a 35mm color film FR80 file. Similar results can be obtained by making a call to FR80ID. However, this is the pre- ferred routine. The calling sequence is: CALL FR80C35 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This can tell gks to give away the file when it is done pro- cessing. The string should be in the form of 'box-disposition'. 'box' should be your box number. 'disposition' can be KEEP if you want the file to remain on disk, or GIVE if you want the file given away to the system. The file name will be in the form of 'fbAAAA0x' where 'AAAA' is 4 random charac- ters. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL FR80C35 (5,'C38-KEEP') FR80DPC (FR80 35mm color slide) ------------------------------- Creates a 35mm color slide FR80 file. Similar results can be obtained by making a call to FR80ID. However, this is the pre- ferred routine. The calling sequence is: CALL FR80DPC (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This can tell gks to give away the file when it is done pro- cessing. The string should be in the form of 'box-disposition'. 'box' should be your box number. 'disposition' can be KEEP if you want the file to remain on disk, or GIVE if you want the file given away to the system. The file name will be in the form of 'fiAAAA0x' where 'AAAA' is 4 random charac- ters. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL FR80DPC (6,'C38-KEEP') T4010 (Tektronix 4010/4012 Driver without segment allocation) ------------------------------------------------------------- Creates a tektronix 4010 file or outputs 4010 escape se- quences. The calling sequence is: CALL T4010 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. If this is ' ', the driver will output directly to the termi- nal. Any other character string specifies the name of the output file that will contain the tektronix code. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL T4010 (7,'TEK.OUT') T4010S (Tektronix 4010/4012 Driver with segment allocation) ----------------------------------------------------------- Creates a tektronix 4010 file or outputs 4010 escape se- quences. The calling sequence is: CALL T4010S (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. If this is ' ', the driver will output directly to the termi- nal. Any other character string specifies the name of the output file that will contain the tektronix code. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL T4010S (8,'TEK.OUT') T4105 (Tektronix 4105 Driver without segment allocation) -------------------------------------------------------- Creates a tektronix 4105 file or outputs 4105 escape se- quences. The calling sequence is: CALL T4105 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. If this is ' ', the driver will output directly to the termi- nal. Any other character string specifies the name of the output file that will contain the tektronix code. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL T4105 (9,'TEK.OUT') T4105S (Tektronix 4105 Driver with segment allocation) ------------------------------------------------------ Creates a tektronix 4105 file or outputs 4105 escape se- quences. The calling sequence is: CALL T4105S (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. If this is ' ', the driver will output directly to the termi- nal. Any other character string specifies the name of the output file that will contain the tektronix code. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL T4105S (10,'TEK.OUT') GKSMET (GKS metafile output) ---------------------------- Creates a GKS metafile. The calling sequence is: CALL GKSMET (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL GKSMET (11,'GKSM.OUT') CGMTXT (CGM metafile clear text output) --------------------------------------- Creates a CGM clear text output file. The calling sequence is: CALL CGMTXT (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL CGMTXT (12,'CGMT.OUT') CGMCHR (CGM metafile character encoding output) ----------------------------------------------- Creates a CGM character encoded output file. The calling sequence is: CALL CGMCHR (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL CGMCHR (13,'CGMC.OUT') CGMBIN (CGM metafile binary encoding output) -------------------------------------------- Creates a CGM binary encoded output file. The calling sequence is: CALL CGMBIN (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL CGMBIN (14,'CGMB.OUT') DICO1 (Dicomed Point Plot 35mm color film) ------------------------------------------ Creates a Dicomed Point Plot 35mm color film output file. The calling sequence is: CALL DICO1 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. This has to be in the for- mat of 'box-disposition', where 'box' is your box number and 'disposition' is either 'KEEP', 'GIVE'. If you specify 'GIVE', the file will be given away for processing. If you specify 'KEEP', the file will be given a name in the format 'fjAAAA0x', where 'AAAA' is 4 random characters. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL DICO1 (16,'C38-KEEP') DICO2 (Dicomed Point Plot 16mm color film) ------------------------------------------ Creates a Dicomed Point Plot 16mm color film output file. The calling sequence is: CALL DICO2 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. This has to be in the for- mat of 'box-disposition', where 'box' is your box number and 'disposition' is either 'KEEP', 'GIVE'. If you specify 'GIVE', the file will be given away for processing. If you specify 'KEEP', the file will be given a name in the format 'flAAAA0x', where 'AAAA' is 4 random characters. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL DICO2 (17,'C38-KEEP') DICO3 (Dicomed Point Plot 35mm color slides) -------------------------------------------- Creates a Dicomed Point Plot 35mm color slides output file. The calling sequence is: CALL DICO3 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. This has to be in the for- mat of 'box-disposition', where 'box' is your box number and 'disposition' is either 'KEEP', 'GIVE'. If you specify 'GIVE', the file will be given away for processing. If you specify 'KEEP', the file will be given a name in the format 'fnAAAA0x', where 'AAAA' is 4 random characters. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL DICO3 (18,'C38-KEEP') DICO4 (Dicomed Point Plot 4x5 color Polaroid film) -------------------------------------------------- Creates a Dicomed Point Plot 4x5 color Polaroid film output file. The calling sequence is: CALL DICO4 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. This has to be in the for- mat of 'box-disposition', where 'box' is your box number and 'disposition' is either 'KEEP', 'GIVE'. If you specify 'GIVE', the file will be given away for processing. If you specify 'KEEP', the file will be given a name in the format 'fpAAAA0x', where 'AAAA' is 4 random characters. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL DICO4 (19,'C38-KEEP') MOVVGA (VGA movie format 320 x 200 x 256) ----------------------------------------- Creates a VGA movie format output file. The calling sequence is: CALL MOVVGA (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL MOVVGA (20,'VGA.OUT') MOVCGA (CGA movie format 320 x 200 x 4) --------------------------------------- Creates a CGA movie format output file. The calling sequence is: CALL MOVCGA (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL MOVCGA (21,'CGA.OUT') MOVEGA (EGA movie format 640 x 350 x 2) --------------------------------------- Creates a EGA movie format output file. The calling sequence is: CALL MOVEGA (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL MOVEGA (22,'EGA.OUT') HDF1 (HDF raster 8 file 320 x 200 x 256) ---------------------------------------- Creates a HDF raster format output file. The calling sequence is: CALL HDF1 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL HDF1 (23,'HDF1.OUT') HDF2 (HDF raster 8 file 512 x 512 x 256) ---------------------------------------- Creates a HDF raster format output file. The calling sequence is: CALL HDF2 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL HDF2 (24,'HDF2.OUT') HDF3 (HDF raster 8 file 640 x 440 x 256) ---------------------------------------- Creates a HDF raster format output file. The calling sequence is: CALL HDF3 (IWKID,CONNID) CHARACTER*8 CONNID INTEGER IWKID The calling arguments are: CONNID The connection identifier. This specifies the output file. IWKID The workstation identifier. This can be any value from 1 to 100. If you are activating more than one workstation, use a different number for each workstation. Example: CALL HDF3 (25,'HDF3.OUT')