Help is available for the following PS2 routines. analog cursor draw4d iswset opens setlit vwport blanks errors getchr lights pop stopob wbtmem bldcon delets getrot line psinit stopwb errors blink dot getscl lineto pswait switch window charsz dotat gettrn makeob push syncs clears drawob hitest master rot tablet closes draw2d hitwin move scale text color draw3d inst moveto scopes tran cossin errors ispchd nufram setbuf txture For individual selections type: ps `routine' (you may abbreviate as long as it is unique) 2 ANALOG ANALOG The ANALOG subroutine is called to read the current value of the specified analog channel and return the relative amount that the channel has changed since the last time ANALOG was called to read that channel. This allows the values re- turned from a call to the subroutine for a given channel to be accumulated in a variable to be used for absolute posi- tioning. FORTRAN Calling Sequence: CALL ANALOG(ICHANL,IVALUE) where: ICHANL is an integer which specifies the device channel number that is to be read. This value may be in the range 0-31, providing support for up to 4 sets of Control Dials. IVALUE is an integer variable in which the value read from the specified channel is to be returned. This value is in the range of approximately +32700 and is the relative value that the channel has changed since this channel was last polled. IVALUE will be returned with a value of zero the first time ANALOG is called. ERRORS: 42,0: Invalid number of arguments in the parameter list. 42,1: Invalid parameter value (ICHANL =/ 0-31). 2 BLANKS BLANKS The BLANKS (BLANK Segment) subroutine is called to cause the specified segment to be blanked/unblanked for subsequent re- freshes. Blanking a segment allows it to remain within the refresh buffer but not displayed. FORTRAN Calling Sequence: CALL BLANKS(N,STATE) where: N is a nonzero integer which specifies the segment "name" which is to be blanked/unblanked. If N is zero, then the default segment blank/unblank status is modified to that specified by the STATE parameter. STATE is a logical value which specifies whether the segment is to be blanked or unblanked. STATE = .TRUE. for blanked. STATE = .FALSE. for unblanked. ERRORS: 41,0: Invalid number of arguments in the parameter list. 41,1: Invalid segment "name". The specified segment does not currently exist. 2 BLDCON BLDCON The BLDCON subroutine is called to perform all transforma- tion operations and matrix manipulations. FORTRAN Calling Sequence: CALL BLDCON(ITYPE,IARRAY) where: ITYPE is an integer which specifies the type of call. Valid values for ITYPE and the operation per- formed for each are: 0= Initialize Matrix Stack pointer and reset the stack length. 1= Load the Transformation Matrix from the 16-word array specified as argument 2. 2= Concatenate the Transformation Matrix with the 16-word array specified as argument 2. 3= Store the Transformation Matrix into the 16-word array specified as argument 2. 4= Pop the top element of the Matrix Stack into the Transformation Matrix. 5= Push the Transformation Matrix onto the Matrix Stack. IARRAY is an integer array (16 words in length) which is used as specified by argument 1. This argu- ment must be a 16-word array for only those op- erations which utilize this parameter (opera- tions 1, 2 and 3). ERRORS: 29,0: Invalid number of arguments in the parameter list. 29,1: Invalid parameter value. 8,0: PUSH error (Matrix Stack overflow). This indi- cates that the Matrix Stack requirements have exceeded the amount allocated by the user dur- ing the call to PSINIT. 9,0: POP error (Matrix Stack underflow). This indi- cates that the user has attempted to retrieve a matrix which had not been previously PUSHed onto the Matrix Stack. 2 BLINK BLINK The BLINK subroutine is called to set the Picture Generator status such that all subsequent lines drawn will blink or will not blink, dependent upon the value of the argument. FORTRAN Calling Sequence: CALL BLINK(ISTAT) where: ISTAT is an integer which specifies the blink/ non-blink mode. ISTAT = 0 for non-blink mode. ISTAT =/ 0 for blink mode. ERRORS: 19,0: Invalid number of arguments in the parameter list. 2 CHARSZ CHARSZ The CHARSZ subroutine is called to update the character size selection parameters used by the Character Generator when characters are displayed by the Picture Generator. FORTRAN Calling Sequence: CALL CHARSZ(ISIZE,ITILT) where: ISIZE is an integer which specifies the character size to be selected. Valid values for ISIZE are: 0 = .36 cm (.14 inches) 1 = .08 cm (.03 inches) 2 = .15 cm (.06 inches) 3 = .25 cm (.10 inches) 4 = .40 cm (.16 inches) 5 = .68 cm (.27 inches) 6 = 1.14 cm (.45 inches) 7 = 1.88 cm (.74 inches) These sizes give the approximate height of a cap- ital letter (A-Z,0-9) based upon a 28.6 x 28.6 cm (11.2 x 11.2 inch) screen viewing area. It should be noted that subscript and superscript characters are only available for ISIZE=2-7. Subscript or superscript character codes (30-33 octal) used when ISIZE=0 or 1 will result in an invalid character size selection. ITILT is an integer which specifies the character ori- entation that is desired. Valid values for ITILT are: ITILT = 0 for horizontal character orientation. ITILT =/ 0 for 90 degree counterclockwise char- acter orientation. ERRORS: 17,0: Invalid number of arguments in the parameter list. 17,1: Invalid parameter value (ISIZE =/ 0-7). 2 CLEARS CLEARS The CLEARS subroutine is called to initialize or re-initialize the display hardware and the segmentation software. Segmentation allows a user to divide his picture into segments which can be independently generated and up- dated. Each segment is referred to by an integer number (or "name"). The CLEARS subroutine initializes a user specified array which is used to maintain data pertaining to each seg- ment. FORTRAN Calling Sequence: CALL CLEARS(IARRAY,ISIZE) where: IARRAY is an integer array ISIZE words in length that is used to contain the data pertaining to each segment. ISIZE is an integer which specifies the size, in words, of IARRAY. ISIZE should be at least 3*(m+n)+6 where m is the maximum number of seg- ments and n is the maximum number of segments which may be active during a refresh cycle. ISIZE must be less than or equal to 4064 (4096-32). ERRORS: 38,0: Invalid number of arguments in the parameter list. 38,1: Invalid parameter value (ISIZE > 4064). 38,2: Invalid call to a segmentation routine. This error may be caused by a call to OPENS, CLOSES, BLANKS or DELETS without previously calling CLEARS. 38,3: Segmentation error. This error is generated when memory compaction attempts to write data past the write-back limit. 38,4: Segmentation error. This error is generated when a "name" is not found when searched for in the refresh buffer. 38,5: Refresh buffer overflow. This error occurs when there is no room for further memory com- paction but more data pendin for output. 2 CLOSES CLOSES The CLOSES (CLOSES Segment) subroutine is called to cause all currently active segments to be closed and included for display during the next refresh cycle. FORTRAN Calling Sequence: CALL CLOSES ERRORS: None 2 COLOR COLOR The COLOR subroutine is called to specify the color that all subsequent data drawn (or until the next COLOR specifica- tion) should be displayed. Color changes should be speci- fied in the following order: red, orange, yellow-orange, yellow, green to ensure maximum display effectiveness. If the user attempts to change colors too often during a frame such that the color monitor is being overdriven, subsequent color changes will not occur. Note: While this routine is provided for use specifically with the beam penetration color monitors, it may be used with a monochrome display to provide an increase in the in- tensity (and a decrease in the speed) with which lines and characters are drawn. FORTRAN Calling Sequence: CALL COLOR(IHUE) where: IHUE is an integer which specifies the color that all subsequent data are to be displayed. 0 = monochrome (deselects color writing rate) 1 = Red 2 = Orange 3 = Yellow-Orange 4 = Yellow 5 = Green Colors may be specified in any combination or any order, but to achieve maximum effectiveness, specification should be from red to green. ERRORS: 21,0: Invalid number of arguments in the parameter list. 21,1: Invalid parameter value (IHUE =/ 0-5). 2 COSSIN COSSIN The COSSIN subroutine is called to compute a cosine and sine for the angle specified and return the values to the calling routine as a binary fraction (the form expected by the Pic- ture Processor). COSSIN is useful for forming one's own ro- tation matrices for use in updating a Linear Display List. FORTRAN Calling Sequence: CALL COSSIN(IANGLE,ICOS,ISIN) where: IANGLE is an integer which specifies the angle of rota- tion. The angle is given by dividing a circle into 2**16 equal parts, with zero being equal to zero degrees and -2**15 equaling 180 degrees. Two's complement addition, ignoring overflow, causes the angle to increase counter-clockwise through 360 degrees, when viewed along the speci- fied axis in the positive direction. ICOS is an integer variable in which the computed co- sine will be returned. ISIN is an integer variable in which the computed sine will be returned. ERRORS: 30,0: Invalid number of arguments in the parameter list. 2 CURSOR CURSOR The CURSOR subroutine is called to display a cursor at the position specified by the parameter list. The user may also specify initiation of automatic cursor mode. This will cause a cursor to be displayed upon each frame refresh re- gardless of the new frame update rate. The cursor displayed in automatic cursor mode will be at the position specified by the x and y position values and within the viewport that had been specified at the time of the initial CURSOR call. The cursor displayed consists of a cross whose center is at the x and y position specified. FORTRAN Calling Sequence: CALL CURSOR([IX,IY,]ISTAT[,IPEN]) where: IX is an integer which specifies the x cursor posi- tion. In automatic cursor mode, the cursor will be placed at the position specified by the con- tents of this word at the time of frame refresh. The value of IX should be in the approximate range of +32767. IY is an integer which specifies the y cursor posi- tion. In automatic cursor mode, the cursor will be placed at the position specified by the con- tents of this word at the time of frame refresh. The value of IY should be in the approximate range of +32767. ISTAT is an integer which specifies the automatic cur- sor mode: ISTAT = 0 for automatic cursor mode off. ISTAT =/ 0 for automatic cursor mode on. IPEN is an integer which, if specified, should be the pen information which is returned from the TABLET subroutine. The specification of this parameter allows the cursor to be increased in intensity whenever the pen is down, providing visual feed- back of the pen status. 2 ERRORS ERRORS: 24,0: Invalid number of arguments in the parameter list. NOTE: If "IX", "IY" and "IPEN" are not specified in the parameter list, the default variables IX, IY and IPEN in the named COMMON block PSCOM will be used to specify the position of the cursor. With ex- ception of the automatic cursor mode, the cursor is at all times displayed in the viewport that is specified by the values in the default variables, IVL, IVR, IVB, IVT, IHI, IYI in the PICTURE SYS- TEM COMMON block PSCOM. If the cursor is to be displayed in other than the default viewport set by PSINIT, these variables must then be modified by the user to reflect the boundaries of the viewport in which the cursor is to be displayed. In automatic cursor mode, the cursor is always displayed within a full-screen viewport. 2 DELETS DELETS The DELETS (DELETe Segment) subroutine is called to cause the segment specified to be deleted from the refresh buffer. Deleting a segment not only causes it not to be displayed but also frees up the area of refresh memory it occupied. It should be noted that the opening (OPENS) of an existing segment is an implied deletion when the new segment is closed. FORTRAN Calling Sequence: CALL DELETS(N) where: N is a nonzero integer which specifies the segment "name" to be deleted. ERRORS: 40,0: Invalid number of arguments in the parameter list. 40,1: Invalid segment "name". The specified segment does not currently exist. 2 DOT DOT The DOT subroutine is called to draw a dot at the specified 2D relative X,Y coordinates or the 3D relative X,Y,Z coordi- nates from the current position. FORTRAN Calling Sequence: CALL DOT(IDX,IDY[,IDZ]) where: IDX is an integer which specifies the delta X rela- tive coordinate. IDY is an integer which specifies the delta Y rela- tive coordinate. IDZ is an integer which, if specified, is the delta Z relative coordinate. If IDZ is not specified, the 3-space relative coordinate (IDX,IDY,0) is positioned to. ERRORS: 13,0: Invalid number of arguments in the parameter list. 2 DOTAT DOTAT The DOTAT subroutine is called to draw a dot at the 2D abso- lute X,Y coordinates or the 3D absolute X,Y,Z coordinates specified. FORTRAN Calling Sequence: CALL DOTAT(IX,IY[,IZ]) where: IX is an integer which specifies the X absolute coordinate. IY is an integer which specifies the Y absolute coordinate. IZ is an integer which, if specified, is the Z abso- lute coordinate. If IZ is not specified, the 3-space point (IX,IY,0) is positioned to. NOTE: DOTAT positions for the dot with the homogeneous coordinate (IW)=32767. ERRORS: 13,0: Invalid number of arguments in the parameter list. 2 DRAWOB DRAWOB The DRAWOB subroutine is called to output a linear display list, previously prepared by the MAKEOB subroutine, to the Picture Processor. When this routine is called, the PICTURE SYSTEM is placed in a mode such that the entire command/data list is processed in a single DMA operation. FORTRAN Calling Sequence: CALL DRAWOB(IARRAY) where: IARRAY is a user-supplied array in which the linear dis- play list previously accumulated by MAKEOB is lo- cated. NOTE: If desired, DRAWOB may be called while MAKEOB mode is active. This will cause the linear dis- play list stored in IARRAY to be incorporated into the object currently being constructed. In this case, the command and data array supplied with the call will be incorporated into the ob- ject currently being constructed. ERRORS: 35,0: Invalid number of arguments in the parameter list. 35,1: Invalid array content. 35,2: Attempt to exceed matrix stack limits. All pushes and pops must be able to be performed in hardware, thereby limiting the maximum level of pushes or pops within a linear display list to 8. 2 DRAW2D DRAW2D The DRAW2D subroutine is called to draw two-dimensional data coordinate points using the drawing mode specified in the parameter list. The points to be drawn are arranged in x,y pairs and displayed at the intensity dependent upon the IZ parameter and the intensity values specified for the hither and yon planes. FORTRAN Calling Sequence: CALL DRAW2D(IDATA,INUM,IF1,IF2,IZ[,IW]) where: IDATA is an integer array (2*INUM words in length) which contains the x,y coordinate points to be drawn. This data will be drawn in the drawing mode specified by the arguments IF1 and IF2 and at the intensity specified by argument IZ. INUM is an integer which specifies the number of coor- dinate pairs to be drawn. IF1 is an integer which specifies the type of draw function to be performed. Valid values for IF1 are: 0 = disjoint lines from new position. 1 = disjoint lines from current position. 2 = connected lines from new position. 3 = connected lines from current position. 4 = dot at each point. IF2 is an integer which specifies the mode in which the coordinates are interpreted. Valid values for IF2 are: 0 = absolute-relative-relative-relative-etc. 1 = relative always. 2 = absolute always. 3 = set base-offset-offset-offset, etc. 4 = offset always. IZ is an integer which specifies the Z position of the x,y coordinate pairs drawn. This Z position is used to compute the intensity of the data to be drawn. A value of IZ=0 will produce lines of maximum intensity when drawn using a two-dimensional window*. -------------------------------- *The maximum intensity is specified using the VWPORT subroutine. IW is an integer used to scale the coordinate data. If the scale factor is omitted, or given as zero, it is treated as 32767. ERRORS: 14,0: Invalid number of arguments in the parameter list. 14,1: Invalid parameter value. This error may be caused by: INUM < 0. IF1 =/ 0-4. IF2 =/ 0-4. 2 DRAW3D DRAW3D The DRAW3D subroutine is called to draw three-dimensional data coordinate points using the drawing mode specified in the parameter list. The points to be drawn are arranged in x,y,z triplets and displayed at the intensity dependent upon the z coordinates and the intensity values specified for the hither and yon planes. FORTRAN Calling Sequence: CALL DRAW3D(IDATA,INUM,IF1,IF2[,IW]) where: IDATA is an integer array (3*INUM words in length) which contains the x,y,z coordinate points to be drawn. This data will be drawn in the drawing mode specified by the arguments IF1 and IF2. INUM is an integer which specifies the number of coor- dinate triples to be drawn. IF1 is an integer which specifies the type of draw function to be performed. Valid values for IF1 are: 0 = disjoint lines from new position. 1 = disjoint lines from current position. 2 = connected lines from new position. 3 = connected lines from current position. 4 = dot at each point. IF2 is an integer which specifies the mode in which the coordinates are interpreted. Valid values for IF2 are: 0 = absolute-relative-relative-relative-etc. 1 = relative always. 2 = absolute always. 3 = set base-offset-offset-offset, etc. 4 = offset always. IW is an integer used to scale the coordinate data. If the scale factor is omitted, or given as zero, it is treated as 32767. 2 ERRORS ERRORS: 15,0: Invalid number of arguments in the parameter list. 15,1: Invalid parameter value. This error may be caused by: INUM < 0. IF1 =/ 0-4. IF2 =/ 0-4. 2 DRAW4D DRAW4D The DRAW4D subroutine is called to draw homogeneous coordi- nate data using the drawing mode specified in the parameter list. The points to be drawn are arranged as sets of x,y,z,w coordinates and displayed at the intensity dependent upon the scaled Z coordinates and the values specified for the intensity values specified for the hither and yon planes. FORTRAN Calling Sequence: CALL DRAW4D(IDATA,INUM,IF1,IF2) where: IDATA is an integer array (4*INUM words in length) which contains the x,y,z,w coordinate data to be drawn. This data will be drawn in the drawing mode specified by the arguments IF1 and IF2. INUM is an integer which specifies the number of coor- dinate sets to be drawn. IF1 is an integer which specifies the type of draw function to be performed. Valid values for IF1 are: 0= disjoint lines from new position. 1= disjoint lines from current position. 2= connected lines from new position. 3= connected lines from current position 4= dot at each point. IF2 is an integer which specifies the mode in which the coordinates are interpreted. Valid values for IF2 are: 0= absolute-relative-relative-relative-etc. 1= relative always. 2= absolute always. 3= set base-offset-offset-offset-etc. 4= offset always. ERRORS: 16,0: Invalid number of arguments in the parameter list. 16,1: Invalid parameter value. This error may be caused by: INUM < 0. IF1 =/ 0-4. IF2 =/ 0-4. 2 GETCHR GETCHR The GETCHR subroutine is called to return all characters that have been input since the last line terminator (i.e., Carriage Return, Line Feed or Form Feed). Multiple lines may be buffered internal to GETCHR and the user may continue to input characters until 80 characters have been input. If more than 80 characters are entered before a line termina- tor, all characters after the 80th will be ignored. FORTRAN Calling Sequence: CALL GETCHR(ICOUNT,IBUFF,ISTAT[,MAX]) where: ICOUNT is an integer variable where the count of the number of characters in the user supplied buffer (IBUFF) will be returned. If ICOUNT = 0 then no characters have been input since the previously entered line terminator. IBUFF is an integer array into which all characters which have been input, since initialization or the last line terminator, will be placed. This buffer should be 80 bytes in length (or MAX bytes in length, if the MAX parameter is specified). Note that the line terminator is not returned to the user buffer. ISTAT is an integer variable which is set by GETCHR to indicate the status of the character string re- turned in the user supplied buffer. ISTAT = 0 character string incomplete. ISTAT = 1 character string complete. MAX is an integer which, if specified, is the maximum number of characters to return in the user sup- plied buffer. If MAX is not specified, then up to 80 characters may be returned. MAX must be < 80. ERRORS: 43,0: Invalid number of arguments in the parameter list. 2 GETROT GETROT The GETROT subroutine is called to build a rotation trans- formation based on the angle and axis of rotation specified in the parameter list. The transformation is then returned in the user-supplied 16-word matrix buffer, IARRAY. FORTRAN Calling Sequence: CALL GETROT(IARRAY,IANGLE,IAXIS) where: IARRAY is a 16-word array in which the 4x4 rotation transformation is to be returned. IANGLE is an integer which specifies the angle of rota- tion. The angle is given by dividing a circle into 2**16 equal parts, with zero being equal to zero degrees and -2**15 equaling 180 degrees. Two's complement addition, ignoring overflow, causes the angle to increase counter-clockwise through 360 degrees, when viewed along the speci- fied axis in the positive direction. IAXIS is an integer which specifies the axis of rota- tion. Valid values for IAXIS are: 1 for rotation about x axis. 2 for rotation about y axis. 3 for rotation about z axis. ERRORS: 30,0: Invalid number of arguments in the parameter list. 30,1: Invalid argument specified for the axis of rota- tion. 2 GETSCL GETSCL The GETSCL subroutine is called to build a scaling transfor- mation based on the X, Y and Z scaling terms specified in the parameter list. The transformation is then returned in the user-supplied 16-word matrix buffer, IARRAY. FORTRAN Calling Sequence: CALL GETSCL(IARRAY,ISX,ISY,ISZ[,IW]) where: IARRAY is a 16-word array in which the 4x4 scaling transformation is to be returned. ISX is an integer which specifies the X scale value. ISY is an integer which specifies the Y scale value. ISZ is an integer which specifies the Z scale value. IW is an integer which specifies the factor used to scale the scaling definition values. If the scale factor is omitted or given as zero, it is treated as 32767. ERRORS: 32,0: Invalid number of arguments in the parameter list. 2 GETTRN GETTRN The GETTRN subroutine is called to build a translation transformation based on the X, Y and Z translational values specified in the parameter list. The transformation is then returned in the user-supplied 16-word matrix buffer, IARRAY. FORTRAN Calling Sequence: CALL GETTRN(IARRAY,ITX,ITY,ITZ[,IW]) where: IARRAY is a 16-word array in which the 4x4 translation transformation is to be returned. ITX is an integer which specifies the scaled X trans- lation value. ITY is an integer ehich specifies the scaled Y trans- lation value. ITZ is an integer which specifies the scaled Z trans- lation value. IW is an integer which specifies the factor used to scale the translational values. If the scale factor is omitted, or is given as zero, it is treated as 32767. ERRORS: 31,0: Invalid number of arguments in the parameter list. 2 HITEST HITEST The HITEST subroutine is called to determine if any data has passed within a prespecified hit window (see HITWIN). The procedure for this test is of the form: 1. CALL HITWIN to set up the desired hit window. 2. Draw data (DRAW2D, DRAW3D, etc.) for comparison against that window. 3. CALL HITEST to determine if there was a "hit". 4. Repeat steps 2 and 3 as often as necessary, set- ting HITEST argument 2 to a nonzero value on the last call to HITEST to restore the former user transformation. FORTRAN Calling Sequence: CALL HITEST(IHIT,ISTAT) where: IHIT is an integer which is set to zero by the HITEST subroutine if there has been no hit, or set to one if there has been a hit. ISTAT is an integer supplied by the user which indi- cates whether the hit testing has been completed. ISTAT = 0 for intermediate hit test. ISTAT =/ 0 for final hit test. The Picture Processor Transformation Matrix will be restored to the transformation that existed before the call to the HITWIN subroutine and the Picture Processor status reset so that all subsequent data drawn will be sent to the Refresh Controller. ERRORS: 26,0: Invalid number of arguments in the parameter list. 2 HITWIN HITWIN The HITWIN subroutine is called to specify a window through which data will be drawn. The user specifies an x and y coordinate at which to center a window transformation of the specified size. This window transformation is then pre-concatenated with the transformation in the Picture Pro- cessor Transformation Matrix, after first saving the origi- nal transformation so that it may be restored after all hit testing has been completed. The Picture Processor status is then set to prohibit all data drawn from being output to the refresh buffer. The subroutine then returns to allow the user to draw all data against which hit testing is to be performed. FORTRAN Calling Sequence: CALL HITWIN(IX,IY,ISIZE[,IW]) where: IX is an integer which specifies the hit window x coordinate. The value of IX should be in the ap- proximate range of +32700. IY is an integer which specifies the hit window y coordinate. The value of IY should be in the ap- proximate range of +32700. ISIZE is an integer which specifies the hit window half size. This parameter is used to determine wheth- er lines pass within a given distance (ISIZE) of the specified point (IX,IY). IW is an integer used to scale the hit window param- eters. If the scale factor is omitted, or is given as zero, it is treated as 32767. ERRORS: 25,0: Invalid number of arguments in the parameter list. 2 INST INST The INST subroutine concatenates a two- or three-dimensional instancing transformation to the Picture Processor Transfor- mation Matrix. This subroutine is used, in conjunction with the MASTER subroutine, to produce multiple instances of an object or symbol. For each desired appearance of the ob- ject, the INST subroutine is called to specify the location (and implicitly the size) of that appearance; then the user-supplied routine describing the object is called to display the object previously defined within a two-dimensional or three-dimensional enclosure. The INST subroutine pushes the initial Transformation Matrix onto the Transformation Stack before concatenating the instancing transformation, so that it may be restored (POPed) by the user after the object has been drawn. FORTRAN Calling Sequence: For two-dimensional instancing: CALL INST(INL,INR,INB,INT[,IW]) For three-dimensional instancing: CALL INST(INL,INR,INB,INT,INH,INY[,IW]) where: INL is an integer which specifies the scaled instance left boundary in definition space coordinates (+32767). INR is an integer which specifies the scaled instance right boundary in definition space coordinates (+32767). INB is an integer which specifies the scaled instance bottom boundary in definition space coordinates (+32767). INT is an integer which specifies the scaled instance top boundary in definition space coordinates (+32767). INH is an integer which specifies the scaled instance hither boundary in definition space coordinates (+32767). For two-dimensional instancing, the window front, or hither, boundary is 0. IWY is an integer which specifies the scaled instance yon boundary in definition space coordinates (+32767). For two-dimensional windowing, the in- stance rear, or yon, boundary is equal to IW. IW is an integer used to scale the instance boundar- ies. If the scale factor is omitted, or given as zero, it is treated as 32767. ERRORS: 8,0: Invalid number of arguments in the parameter list. 2 ISPCHD ISPCHD ISPCHD (Is Pen CHangeD?) is a FORTRAN-callable integer func- tion subroutine which may be used to determine whether the status of the pen in relation to the last time this routine was called has changed. This facilitates the testing for pen transitions (i.e., up to down, down to up), a function often required in tablet interaction. Typical FORTRAN Calling Sequence: C C WAIT FOR PEN TO BE LIFTED UP C 100 IF(ISPCHD(IPEN).NE.3) GO TO 100 . . . or C C GET CURRENT PEN STATUS C IPSTAT=ISPCHD(IPEN) . . . where: IPEN is an integer variable which contains the pen in- formation returned by the TABLET subroutine. ISPCHD = 0 if pen is up and was up last call. ISPCHD = 1 if pen is down and was up last call. ISPCHD = 2 if pen is down and was down last call. ISPCHD = 3 if pen is up and was down last call. ERRORS: None 2 ISWSET ISWSET ISWSET (Is SWitch SET) is a FORTRAN-callable integer func- tion subroutine which may be used to determaine whether a particular switch of the PICTURE SYSTEM 2 Function Switches is set. This function routine allows FORTRAN application programs which do not have the ability to perform bit test- ing to test the status of a switch. Typical FORTRAN Calling Sequences: C C COLLECT ALL SWITCH SETTINGS C DO 10 I=1,16 IVALUE(I) = ISWSET(I-1) 10 CONTINUE or C C IS SWITCH "N" SET? C IF(ISWSET(N).EQ.1) GO TO 100 C C NO...IT'S NOT SET, JUST CONTINUE C 50 CONTINUE where: N is an integer which specifies the switch number that is to be tested. N=0-15 for 1 set of Function Switches & Lights N=0-31 for 2 sets of Function Switches & Lights N=0-47 for 3 sets of Function Switches & Lights ISWSET(N)=0 if the switch is not set. ISWSET(N)=1 if the switch is set. ERRORS: 37,0: Invalid number of arguments in the parameter list. 37,1: Invalid switch number (N =/ 0-63). 2 LIGHTS LIGHTS The LIGHTS subroutine is called to set a 16-bit value into a particular set of lights of the PICTURE SYSTEM 2 Function Switches & Lights. FORTRAN Calling Sequence: CALL LIGHTS(IVALUE[,ISET]) where: IVALUE is an integer which specifies the 16-bit value to be placed into the lights. ISET is an integer which specifies which set of PIC- TURE SYSTEM Function Switches & Lights is to be used. If the set number is omitted, Funcion Switch & Light set 1 is assumed. ISET=1 for Function Switch & Light Set 1. ISET=2 for Function Switch & Light Set 2. ISET=3 for Function Switch & Light Set 3. ISET=4 for Function Switch & Light Set 4. ERRORS: 37,0: Invalid number of arguments in the parameter list. 37,l: Invalid parameter value (ISET =/ 1-4). 2 LINE LINE The LINE subroutine is called to draw a line in the present line mode, specified during initialization or by a previous call to TXTURE or BLINK, from the current position to the 2D relative X,Y coordinates or the 3D relative X,Y,Z coordi- nates specified. FORTRAN Calling Sequence: CALL LINE(IDX,IDY[,IDZ]) where: IDX is an integer which specifies the delta X rela- tive coordinate. IDY is an integer which specifies the delta Y rela- tive coordinate. IDZ is an integer which, if specified, is the delta Z relative coordinate. If IDZ is not specified, a line is drawn to the 3-space coordinate (IDX,IDY,0). ERRORS: 12,0: Invalid number of arguments in the parameter list. 2 LINETO LINETO The LINETO subroutine is called to draw a line in the pre- sent line texture from the current position to the 2D abso- lute X,Y coordinates or the 3D absolute X,Y,Z coordinates specified. FORTRAN Calling Sequence: CALL LINETO(IX,IY[,IZ]) where: IX is an integer which specifies the X absolute coordinate. IY is an integer which specifies the Y absolute coordinate. IZ is an integer which, if specified, is the Z abso- lute coordinate. If IZ is not specified, a line is drawn to the 3-space point (IX,IY,0). NOTE: LINETO draws the line with the homogeneous coor- dinate (IW)=32767. ERRORS: 12,0: Invalid number of arguments in the parameter list. 2 MAKEOB MAKEOB The MAKEOB subroutine is called to initiate a mode in which all commands and data directed to the Picture Processor are intercepted and accumulated in a user-supplied array in the form of a linear display list. The command and data accumu- lated in this array may later be output to the PICTURE SYS- TEM as a unit (or object), thus saving preparation time and other overhead. Any of the Graphics Software distributed as part of the PICTURE SYSTEM 2 Graphics Software Package may be used in creating a linear display list. FORTRAN Calling Sequence: [EXTERNAL FULSUB] CALL MAKEOB(IARRAY,MAX,LEN[,FULSUB]) where: IARRAY is a user-supplied array (MAX words in length) into which the accumulated commands and data are buffered. MAX is an integer which specifies the maximum length of the user-supplied buffer (IARRAY). LEN is an integer variable where the number of buffer words actually used will be maintained. This variable is set to 1 when MAKEOB is called and again by each call to FULSUB (see below). It may be modified by the user (carefully). FULSUB is a subroutine which, if specified, is to be called when IARRAY becomes full. If supplied, the calling sequence must be: CALL FULSUB(IARRAY,LEN) NOTE: As commands and data are collected in IARRAY, the maximum nesting of matrix pushes and pops is ma- intained in counters, and is included as part of the structure. In this way, it may be determined in advance if display of this object will cause a matrix stack overflow or underflow, since software extension of the 8-deep matrix stack is not possible during the processing of a linear display list. The "LEN" parameter specified above may serve as an extremely valuable tool where the "IARRAY" buffer is large enough to contain the entire array in one piece. In this case, if the value of "LEN" is saved immediately preceding the call to any PICTURE SYSTEM 2 graphics subroutine, and the saved value incremented by one, it will serve as a FORTRAN subscript for "IARRAY" pointing to the generated command word. If it is again in- cremented, it then points to the object data. ERRORS: 33,0: Invalid number of arguments in the parameter list. 33,1: Invalid parameter value (MAX < 0). 33,2: Re-entrant call to MAKEOB. 33,3: Overflow of user-supplied buffer (IARRAY). This will occur only if a FULSUB subroutine was not specified. 2 MASTER MASTER The MASTER subroutine concatenates a two-dimensional or three-dimensional master transformation to the Picture Pro- cessor Transformation Matrix. This subroutine is used in conjunction with the INST subroutine for instancing of data. The master transformation is constructed from the values specified in the parameter list. FORTRAN Calling Sequence For a two-dimensional master: CALL MASTER(IML,IMR,IMB,IMT[,IW]) For a three-dimensional master: CALL MASTER(IML,IMR,IMB,IMT,IMH,IMY[,IW]) where: IML is an integer which specifies the scaled master left boundary in definition space coordinates (+32767). IMR is an integer which specifies the scaled master right boundary in definition space coordinates (+32767). IMB is an integer which specifies the scaled master bottom boundary in definition space coordinates (+32767). IMT is an integer which specifies the scaled master top boundary in definition space coordinates (+32767). IMH is an integer which specifies the scaled master hither boundary in definition space coordinates (+32767). For a two-dimensional master, the front, or hither, boundary is 0. IMY is an integer which specifies the scaled window yon boundary in definition space coordinates (+32767). For a two-dimensional master, the rear, or yon, boundary is equal to IW. IW is an integer used to scale the master boundar- ies. If the scale factor is omitted, or is given as zero, it is treated as 32767. ERRORS: 7,0: Invalid number of arguments in the parameter list. 2 MOVE MOVE The MOVE subroutine is called to position to the specified 2D relative X,Y coordinates or the 3D relative X,Y,Z coordi- nates from the current position. FORTRAN Calling Sequence: CALL MOVE(IDX,IDY[,IDZ]) where: IDX is an integer which specifies the delta X rela- tive coordinate. IDY is an integer which specifies the delta Y rela- tive coordinate. IDZ is an integer which, if specified, is the delta Z relative coordinate. If IDZ is not specified, the 3-space relative coordinate (IDX,IDY,0) is positioned to. ERRORS: 11,0: Invalid number of arguments in the parameter list. 2 MOVETO MOVETO The MOVETO subroutine is called to position to the 2D abso- lute X,Y coordinates or the 3D absolute X,Y,Z coordinates specified. FORTRAN Calling Sequence: CALL MOVETO(IX,IY[,IZ]) where: IX is an integer which specifies the X absolute coordinate. IY is an integer which specifies the Y absolute coordinate. IZ is an integerw which, if specified, is the Z ab- solute coordinate. If IZ is not specified, the 3-space point (IX,IY,0) is positioned to. NOTE: MOVETO positions with the homogeneous coordinate (IW)=32767. ERRORS: 11,0: Invalid number of arguments in the parameter list. 2 NUFRAM NUFRAM The NUFRAM subroutine is called to initiate the switch from displaying the old frame data to displaying the new frame data (the actual data switch does not occur until the appro- priate refresh interval). FORTRAN Calling Sequence: CALL NUFRAM ERRORS: None 2 OPENS OPENS The OPENS (OPEN Segment) subroutine is called to open an area of the refresh buffer for the creation of a new seg- ment. All subsequent data output to Picture Memory will be placed in this segment until OPENS, CLOSES or DELETS is called. If a segment by the same name currently exists then that segment will be automatically deleted when this new segment is closed and included for display during the next refresh cycle. FORTRAN Calling Sequence: CALL OPENS(N) where: N is a nonzero integer which is to serve as the name for this segment. ERRORS: 39,0: Invalid number of arguments in the parameter list. 39,1: Invalid segment "name". This may be caused by N = 0. 39,2: This segment has been opened again without ever having been explicitly closed. 39,3: Too many segments active for the size of the array specifed in the call to CLEARS. 2 POP POP The POP subroutine is called to pop the top element of the Matrix Stack into the Picture Processor Transformation Ma- trix. FORTRAN Calling Sequence: CALL POP ERRORS: 10,0: POP error (Matrix Stack underflow). This indi- cates that the user has attempted to retrieve a matrix which had not been previously PUSHed onto the Matrix Stack. 2 PSINIT PSINIT The PSINIT subroutine is called to initialize the PICTURE SYSTEM 2 hardware and software. The initialization process includes the following: The PICTURE SYSTEM 2 interrupt handlers are connected and set to provide refresh of the old frame and timing for frame update at the intervals specified by the cal- ling argument list. All variables are assigned their default values. All registers used in the Picture Processor are initialized for two-dimensional drawing mode. The Picture Proces- sor is set to display data unrotated, untranslated, at full brightness, within a viewport which just fills the display screen. A window is set to include the entire definition space (+32767). The Refresh Controller is set to double-buffer mode with an initial null frame. The Picture Generator status is initialized to solid line texture and to dis- play characters of .68 cm (.27") character size, and horizontal character mode. All Picture Displays (scopes 0-5) are selected for out- put. FORTRAN Calling Sequence: CALL PSINIT(IFTIME,INRFSH,[ICLOCK],[ERRSUB],[ISTKCT], [ISTKAD],[IFMCNT]) where: IFTIME is an integer used to designate the number of 1/120 second intervals per frame refresh. The refresh rates that may be obtained are: IFTIME=1 for 120 frames per second IFTIME=2 for 60 frames per second IFTIME=3 for 40 frames per second IFTIME=4 for 30 frames per second INRFSH is an integer which specifies the number of frame refreshes which must be completed before a frame update will be recognized. If INRFSH contains a value < 0, then frame update will be allowed upon the next refresh interval after a new frame has been requested. ICLOCK is an integer variable which, if specified, is incremented upon each frame refresh. This pro- vides the user with the ability to display items for given lengths of time synchronized to the re- fresh rate. ERRSUB is a subroutine supplied by the user which is called using the standard FORTRAN calling se- quence upon the occurrence of a PICTURE SYSTEM error. One argument is passed to the user's error subroutine specifying the PICTURE SYSTEM subroutine in which the error occurred and the particular error condition encountered. The ar- gument is of the following form: N=Error Condition Code*256 + PICTURE SYSTEM Su- broutine Identifier. See Section 4.3 for a list of PICTURE SYSTEM su- broutine identifiers and condition codes. The specification of the user error subroutine is optional. The system subroutine PSERRS will be called if the user error subroutine is omitted from the parameter list. ISTKCT is an integer which specifies the number of 16-word continuous arrays allocated as software matrix stack area. The amount of matrix stack area that need be allocated by the user is depen- dent upon the level of Picture Processor Matrix Transformations that are pushed onto the matrix stack (using the PUSH subroutine) by the user. This argument need be specified only if the number of matrix transformations to be stacked exceeds eight--the number utilized with the Pic- ture Processor. ISTKAD is an integer array allocated as software matrix stack area. This contiguous area need be 16*ISTKCT words in length. If ISTKCT contains the value 0 or is not specified, this argument will not be utilized. IFMCNT is an integer variable which, if specified, will be incremented upon each refresh interval by the number of 1/120 seconds that have elapsed since the last frame refresh. This provides the user with the ability to determine the frame update rate for given display segments. It should be noted that a named COMMON block is defined by the Graphics Software for default variable usage. The named COMMON block is defined as follows: COMMON/PSCOM/ICLOCK,IFMCNT,IX,IY,IPEN,IVL,IVR,IVB ,IVT,IHI,IYI where: ICLOCK: is the default variable which is incremented if the user does not specify an 'ICLOCK' parameter in the call to PSINIT. IFMCNT: is the default variable which is incremented each 1/120 second if the user does not specify an "IFMCNT" parameter in the call to PSINIT. IX,IY,IPEN: are the default parameters which are used by the TABLET and CURSOR routines if no parameters are specified by the user to those subroutines. IVL,IVR,IVB,IVT,IHI,IYI: specify the viewpoint boundaries within which the cursor is always displayed. Upon initialization by PSINIT, the variables are set to the default boundaries for the cursor, -2048 to +2047. These variables may be altered dynamically to cause a cursor to be displayed on any portion of the screen for nonautomatic cursor mode. ERRORS: 1,0: Invalid number of arguments in the parameter list. 1,1: Invalid parameter values. This error may be caused by: IFTIME=0. ISTKCT=0. ISTKAD omitted in parameter list for ISTKCT =/ 0. 2 PSWAIT PSWAIT The PSWAIT subroutine is called whenever it is necessary to wait until the Picture Processor and Direct Memory Access Unit have completed their present operations before continu- ing. This is used to ensure that the data transfer to or from the Picture Controller's memory is complete before the data is referenced or modified. FORTRAN Calling Sequence: CALL PSWAIT ERRORS: None 2 PUSH PUSH The PUSH subroutine is called to push the current Picture Processor Transformation Matrix onto the Matrix Stack. FORTRAN Calling Sequence: CALL PUSH ERRORS: 9,0: PUSH error (Matrix Stack overflow). This indi- cates that the Matrix Stack requirement has ex- ceeded the amount allocated. 2 ROT ROT The ROT subroutine is called to build a rotation transforma- tion based on the angle and axis of rotation specified in the parameter list. The transformation is then concatenated to the Picture Processor Transformation Matrix. FORTRAN Calling Sequence: CALL ROT(IANGLE,IAXIS) where: IANGLE is an integer which specifies the angle of rota- tion. The angle is given by dividing a circle into 2**16 equal parts, with zero being equal to zero degrees and +2**15 equaling 180 degrees. Two's complement addition, ignoring overflow, causes the angle to increase counter-clockwise through 360 degrees, when viewed along the speci- fied axis in the positive direction. IAXIS* is an integer which specifies the axis of rota- tion. Valid values for IAXIS are: 1 for rotation about X axis. 2 for rotation about Y axis. 3 for rotation about Z axis. ERRORS: 4,0: Invalid number of arguments in the parameter list. 4,1: Invalid argument specified for the axis of rota- tion. ------------------------------------- *PICTURE SYSTEM 2 software is designed for a left-handed coordinate system. 2 SCALE SCALE The SCALE subroutine is called to build a scaling transfor- mation based on the X, Y and Z scaling values specified in the parameter list. The transformation is then concatenated to the Picture Processor Transformation Matrix. FORTRAN Calling Sequence: CALL SCALE(ISX,ISY,ISZ[,IW]) where: ISX is an integer which specifies the X scale value. ISY is an integer which specifies the Y scale value. ISZ is an integer which specifies the Z scale value. IW is an integer which specifies the factor used to scale the scaling definition values. If the scale factor is omitted, or is given as zero, it is treated as 32767. ERRORS: 6,0: Invalid number of arguments in the parameter list. 2 SCOPES SCOPES The SCOPES subroutine is called to select/deselect the Pic- ture Displays to which output will be directed. FORTRAN Calling Sequence: CALL SCOPES(IVALUE) where: IVALUE is an integer which specifies which Picture Dis- plays are to be selected/deselected. IVALUE is interpreted as a 6-bit binary value where each bit that is set will select the corresponding scope and each bit that is not set will deselect the corresponding scope. Thus, the value 1 will select scope 0; 2, scope 1; 4, scope 2; 8, scope 3; 16, scope 4; 32, scope 5. The values are additive so that 1+2+4+8+16+32=63 will select all scopes for display. ERRORS: 22,0: Invalid number of arguments in the parameter list. 22,1: Invalid parameter value (IVALUE =/ 0-63). 2 SETBUF SETBUF The SETBUF subroutine is called to set the refresh buffer to single- or double-buffer mode. Once the refresh buffer has been set to either mode, it may be reset at any time to the opposite mode. The user need only call this subroutine if the refresh buffer is to be used in single-buffer mode. PSINIT, during the initialization process, sets the refresh buffer to the default double-buffer mode. FORTRAN Calling Sequence: CALL SETBUF(ISTAT) where: ISTAT is an integer which specifies the mode the Re- fresh Controller is to be set to. Valid values for ISTAT are: 1 = single-buffer mode. 2 = double-buffer mode. ERRORS: 28,0: Invalid number of arguments in the parameter list. 28,1: Invalid parameter value (ISTAT =/ 1 or 2). 2 SETLIT SETLIT The SETLIT subroutine is called to set or clear an individu- al light of the PICTURE SYSTEM 2 Function Switches & Lights, dependent upon the parameters specified to the subroutine. FORTRAN calling Sequence: CALL SETLIT(N,ISTAT) where: N is an integer which specifies the light number that is to be set or cleared. N=0-15 for 1 set of Function Switches & Lights. N=0-31 for 2 sets of Function Switches & Lights. N=0-47 for 3 sets of Function Switches & Lights. N=0-63 for 4 sets of Function Switches & Lights. ISTAT is an integer which specifies whether the light is to be set or cleared. ISTAT=0 to clear an individual light. ISTAT=/0 to set a light on. ERRORS: 37,0: Invalid number of arguments in the parameter list. 37,1: Invalid light number (N =/ 0-63). 2 STOPOB STOPOB The STOPOB subroutine is called to terminate the creation of a linear display list, initiated by a previous call to the MAKEOB subroutine. The termination of the MAKEOB mode causes the PICTURE SYSTEM 2 software to revert to the normal mode of operation so that all subsequent data "drawn" will be output to the Picture Processor. A call to the FULSUB subroutine will also be invoked if one was specified by the user in the call to MAKEOB. FORTRAN Calling Sequence: CALL STOPOB ERRORS: 34,0: STOPOB called when MAKEOB not in process. 2 STOPWB STOPWB The STOPWB subroutine is called to terminate the write-back to memory mode of operation, initiated by a previous call to the WBTMEM subroutine. The termination of the WBTMEM mode causes the PICTURE SYSTEM 2 software to revert to the normal mode of operation so that all subsequent data output to the Picture Processor will be transformed and output to Picture Memory for display. A call to the FULSUB subroutine will also be invoked if one was specified by the user in the call to WBTMEM. FORTRAN Calling Sequence: CALL STOPWB ERRORS: 36,4: STOPWB called when WBTMEM not in process. 2 SWITCH SWITCH The SWITCH subroutine is called to read a 16-bit value from a particular set of PICTURE SYSTEM 2 Function Switches and return that value in the parameter passed to the routine. FORTRAN Calling Sequence: CALL SWITCH(IVALUE[,ISET]) where: IVALUE is an integer variable in which the 16-bit value read from the Function Switches is returned. ISET is an integer which specifies which set of Func- tion Switches is to be read. If the set number is omitted, Function Switch set 1 is assumed. ISET=1 for Function Switch & Light Set 1. ISET=2 for Function Switch & Light Set 2. ISET=3 for Function Switch & Light Set 3. ISET=4 for Function Switch & Light Set 4. ERRORS: 37,0: Invalid number of arguments in the parameter list. 37,1: Invalid parameter value (ISET =/ 1-4). 2 SYNCS SYNCS The SYNCS (SYNC Segments) subroutine is called to allow the synchronization of the update cycle with the refresh cycle when using segmented-buffer mode. SYNCS will not return to the user until all active segments have been included in the current refresh cycle and all deleted segment areas have been compacted. FORTRAN Calling Sequence: CALL SYNCS ERRORS: None 2 TABLET TABLET The TABLET subroutine is called to read the current pen po- sition and status in relation to the tablet. The user may also specify initiation of automatic tablet mode. This will cause the current pen position to be updated at each frame refresh. This ability, used in conjunction with the auto- matic cursor mode, allows completely dynamic cursor tracking regardless of new frame update rate. It should be noted that once the pen information is updated with the pen down bit set (bit 4), the pen position will not be updated until the user has cleared (zeroed) the pen value word (IPEN) in- dicating that the pen down position has been read or until the pen is set down again. FORTRAN Calling Sequence: CALL TABLET(ISTAT[,IX,IY[,IPEN]) where: ISTAT is an integer which specifies the automatic ta- blet mode: ISTAT = 0 for automatic tablet mode off. ISTAT =/ 0 for automatic tablet mode on. IX is an integer which is updated with the current X pen position. In automatic tablet mode, this value will be updated upon each frame refresh. The approximate limits of IX are +32700. IY is an integer which is updated with the current Y pen position. In automatic tablet mode, this value will be updated upon each frame refresh. The approximate limits of IY are +32700. IPEN is an integer which is updated with the current pen information. Bit 4 will be set if the pen is down and bits 2-0 will be zero if the pen is within proximity of the tablet surface. If bit 4 of IPEN is set, IX and IY will not be updated when the pen is up. NOTE: If "IX", "IY" and "IPEN" are not specified in the parameter list, the default variables IX, IY and IPEN in the named COMMON block PSCOM will receive the tablet information. ERRORS: 23,0: Invalid number of arguments in the parameter list. 2 TEXT TEXT The TEXT subroutine is called to display the text string specified in the parameter list. The display of the text will be from the current beam position and at the intensity associated with the last information displayed. PSINIT ini- tializes the character status or it may be updated by cal- ling the CHARSZ subroutine. FORTRAN Calling Sequence: CALL TEXT(NCHARS,ITEXT) where: NCHARS is an integer which specifies the number of char- acters to be displayed. ITEXT is an integer array which contains the text to be displayed, packed as in a FORTRAN DATA statement. ERRORS: 18,0: Invalid number of arguments in the parameter list. 18,1: Invalid parameter value (NCHARS < 0). 2 TRAN TRAN The TRAN subroutine is called to build a translation trans- formation based on the X, Y and Z translational values spec- ified in the parameter list. The transformation is then concatenated to the Picture Processor Transformation Matrix. FORTRAN Calling Sequence: CALL TRAN(ITX,ITY,ITZ[,IW]) where: ITX is an integer which specifies the scaled X trans- lation value. ITY is an integer which specifies the scaled Y trans- lation value. ITZ is an integer which specifies the scaled Z trans- lation value. IW is an integer which specifies the factor used to scale the translational values. If the scale factor is omitted, or is given as zero, it is treated as 32767. ERRORS: 5,0: Invalid number of arguments in the parameter list. 2 TXTURE TXTURE The TXTURE subroutine is called to set the Picture Generator status such that all subsequent lines drawn will be in the mode selected by the value of the argument. FORTRAN Calling Sequence: CALL TXTURE(ISTAT) where: ISTAT is an integer which specifies the line mode to be selected: ISTAT = 0 for solid lines. ISTAT = 1 for lines consisting of short dashes. ISTAT = 2 for lines consisting of medium-short dashes. ISTAT = 3 for lines consisting of medium-long dashes. ISTAT = 4 for lines consisting of long dashes. ISTAT = 5 for lines consisting of long-short dashes (centerline). ISTAT = 6 for lines consisting of long-short- short dashes. ERRORS: 20,0: Invalid number of arguments specified in the par- ameter list. 20,1: Invalid parameter value (ISTAT =/ 0-6). 2 VWPORT VWPORT The VWPORT subroutine is called to set a viewport specified by the values supplied by the calling parameters. FORTRAN Calling Sequence: CALL VWPORT(IVL,IVR,IVB,IVT,IHI,IYI) where: IVL is an integer which specifies the viewport left position in display screen (or other output medi- um) coordinates. Normal range for IVL is -2048 to +2047. IVR is an integer which specifies the viewport right position in display screen (or other output medi- um) coordinates. Normal range for IVR is -2048 to +2047. IVB is an integer which specifies the viewport bottom position in display screen (or other output medi- um) coordinates. Normal range for IVB is -2048 to +2047. IVT is an integer which specifies the viewport top position in display screen (or other output medi- um) coordinates. Normal range for IVT is -2048 to +2047. IHI is an integer which specifies the display inten- sity at the hither clipping plane. The normal range for IHI is 255 for full intensity to 0 for no intensity. IYI is an integer which specifies the display inten- sity at the yon clipping plane. The normal range for IYI is 255 for full intensity to 0 for no in- tensity. ERRORS: 2,0: Invalid number of arguments in the parameter list. NOTE: The values of the IHI and IYI parameters are normally of the range 255 to 0. This is for software compati- bility with THE PICTURE SYSTEM. These values are di- vided by 4 to yield the final values used in specify- ing the viewport intensities for PICTURE SYSTEM 2 (63-0). 2 WBTMEM WBTMEM The WBTMEM (Write-Back To MEMory) subroutine is called to initiate a mode of operation whereby all data written out to PICTURE SYSTEM 2 are returned to the calling program in a user-supplied buffer, rather than being output to the re- fresh buffer. The calling program is then returned to and write-back continues, as long as there is space in the write-back buffer, until either the STOPWB or NUFRAM subrou- tine is called. When this occurs the write-back subsystem is restored to its status prior to the WBTMEM call. FORTRAN Calling Sequence: [EXTERNAL FULSUB] CALL WBTMEM(IARRAY,MAX,LEN,ITYPE[,FULSUB]) where: IARRAY is the user-supplied write-back buffer (MAX words in length) in which data written back to memory are stored. MAX is an integer which specifies the maximum buffer size, in words. LEN is an integer variable where the number of buffer words actually used is maintained. This variable is zeroed when WBTMEM is called, and must be zer- oed again by FULSUB (see below). It may be modi- fied dynamically by the user (carefully). ITYPE is an integer which specifies the type of data to be written back: 1 = data transformed only. 2 = data transformed and clipped. 3 = data transformed, clipped and viewport mapped. FULSUB is the name of an optional user-supplied subrou- tine which is to be called when the writeback buffer, IARRAY, becomes full. If supplied, the FORTRAN calling sequence will be: CALL FULSUB(IARRAY,LEN) When called, the user's FULSUB routine must empty the writeback buffer (IARRAY) and zero the LEN parameter before returning from the subroutine. The data written back to memory and stored into the user buffer has one of three formats, depending upon the value of ITYPE. The formats are: FORMAT 1 (ITYPE = 1): X-coordinate (1 word) Y-coordinate (1 word) Z-coordinate (1 word) W-coordinate (1 word) (repeat) FORMAT 2 (ITYPE = 2): Command Code (1 word): 0 = MOVETO 1 = DRAWTO 2 = TEXT 3 = STATUS DATA 4 = DOT -1 = EOF (end of frame) For Command Code = 0,1,4: X-coordinate (1 word) Y-coordinate (1 word) Z-coordinate (1 word) W-coordinate (1 word) (repeat) For Command Code = 2: character count (1 byte) character 1 (1 byte) character 2 (1 byte) . . . character n (1 byte) Note: If n is even, a null character (0) is appended to create an even total byte count. For Command Code = 3: Picture Generator Status (2 words) Not Used (1 word) Note: See the PICTURE SYSTEM 2 Reference Manual, Section 2.4.3, for specific Status Word formats. FORMAT 3 (ITYPE = 3): Command Code (1 word): 0 = MOVETO 1 = DRAWTO 2 = TEXT 3 = STATUS DATA 4 = DOT -1 = EOF (end of frame) For Command Code = 0,1,4: X-coordinate (1 word) Y-coordinate (1 word) Z-coordinate (1 word) For Command Code = 2: character count (1 byte) character 1 (1 byte) character 2 (1 byte) . . . character n (1 byte) Note: If n is even, a null character (0) is appended to create an even total byte count. For Command Code =3: Picture Generator Status (2 words) Not Used (1 word) Note: See the PICTURE SYSTEM 2 Reference Manual, Section 2.4.3, for specific Status Word formats. No data follows the EOF code, as it always signifies the end of the frame, and hence, the end of this buffer. For ITYPE = 1, TEXT and status operations will be ignored. 2 ERRORS ERRORS: 36,0: Invalid number of arguments in the parameter list. 36,1: Invalid parameter value. 36,2: Re-entrant WBTMEM call. 36,3: User array overflow in writing back to memory. 2 WINDOW WINDOW The WINDOW subroutine concatenates a two-dimensional or three-dimensional windowing transformation to the Picture Processor Transformation Matrix. This subroutine can be used to perform two-dimensional windowing, orthographic pro- jection or a true perspective transformation of data. The windowing transformation is constructed from the arguments specified in the parameter list. FORTRAN Calling Sequence: For two-dimensional windowing: CALL WINDOW(IWL,IWR,IWB,IWT[,IW]) For three-dimensional windowing: CALL WINDOW(IWL,IWR,IWB,IWT,IWH,IWY[,IE[,IW]]) where: IWL is an integer which specifies the scaled window left boundary in definition space coordinates (+32767). IWR is an integer which specifies the scaled window right boundary in definition space coordinates (+32767). IWB is an integer which specifies the scaled window bottom boundary in definition space coordinates (+32767). IWT is an integer which specifies the scaled window top boundary in definition space coordinates (+32767). IWH is an integer which specifies the scaled window hither boundary in definition space coordinates (+32767). For two-dimensional windowing, the window front, or hither, boundary is 0. IWY is an integer which specifies the scaled window yon boundary in definition space coordinates (+32767). For two-dimensional windowing, the window rear, or yon, boundary is equal to IW. For three-dimensional windowing, if this parame- ter equals IWH, the yon boundary is positioned at infinity on the side of the hither clipping plane opposite the eye so that no yon clipping will be performed. IE is an integer which, if specified, is the scaled Z position of the eye. If this parameter is om- itted or equals IWH, the eye is positioned at minus infinity, which produces an orthographic view of the data. IW is an integer used to scale the window boundaries and eye position. If the scale factor is omit- ted, or is given as zero, it is treated as 32767. ERRORS: 3,0: Invalid number of arguments in the parameter list. 2 UNDOCUMENTED The following undocumented PS2 routines exist. Txture Blink Huesat Speed Scopes(i) Dash Scope Cscope(i) 2 TXTURE SUBROUTINE TXTURE this subroutine is called to set the line texture that all subsequent lines are to be drawn. fortran calling sequence: call txture(i[,icont]) where: i is an integer which specifies the texture that is to be selected. valid values for i are: i=0 solid lines mode i=1 short dashed line mode i=2 medium short dashed line mode i=3 medium long dashed line mode i=4 long dashed line mode i=5 long-short dashed line mode i=6 long-short-short dashed line mode icont is an integer enabling/disabling continuous texture icont=0 disable continuous texture icont<>0 enable continuous texture 2 BLINK SUBROUTINE BLINK this subroutine is called to select the mode that all subsequent lines and characters are to be displayed. fortran calling sequence: call blink(i) where: i is an integer which specifes the blink mode to be selected. i=0 to deselect blink mode i not equal 0 to select blink mode 2 HUESAT SUBROUTINE HUESAT this subroutine is called to set the hue and saturation fields in the line generator status. fortran calling sequence: call huesat(ih[,is]) where: ih = an integer which specifies the hue(0-63.) 0 = red 32. = green 48. = blue is = an integer which specifies the saturation (0-7) 0 = white 7 = full saturation 2 SPEED SUBROUTINE SPEED this subroutine is called to select the line generator speed that all subsequent lines and characters will be drawn at. fortran calling sequence: call speed(i) where: i = an integer which specifies the line generator speed 0 = full speed 1 = 1/2 speed 2 = 1/4 speed 3 = 1/8 speed 2 SCOPES(I) SUBROUTINE SCOPES(I) this subroutine is called to select and deselect the picture displays as indicated by the parameter passed by the user. fortran calling sequence: call scopes(i) where: i is an integer which specifies which scopes are to be selected and deselected. the value passed is inter- preted as a bit mask for the scope selection bits of a status word. for example if i=1 then scope 0 would be selected and all others deselected. 2 DASH SUBROUTINE DASH this subroutine is called to select long dash mode for all subsequent lines and characters displayed. included for picture system 1 software compatability. fortran calling sequence: call dash(i) where: i is an integer which specifies whether dash mode is to be selected or deselected. i=0 to deselect dash mode i not equal 0 to select dash mode 2 SCOPE SUBROUTINE SCOPE this subroutine is called to select or deselect any of the six available scopes for display. included for picture system 1 software compatability. fortran calling sequence: call scope(i) where: i is an integer which specifies the scope to be selected or deselected. i=0 to deselect all scopes i=1 - 6 to select the specified scope i=-1 - -6 to deselect the specified scope 2 CSCOPE(I) SUBROUTINE CSCOPE(I) this subroutine is called to select and deselect the picture displays for screen cursor display as indicated by the parameter passed by the user. fortran calling sequence: call cscope(i) where: i is an integer which specifies which scopes are to be selected and deselected. the value passed is inter- preted as a bit mask for the scope selection bits of a status word. for example if i=1 then scope 0 would be selected and all others deselected.