r plotting library for tektronix conprtisle devices(u) … · ad-a173 985 afgl-tr-86-0014 a...

71
AD-Rl?3 905 R PLOTTING LIBRARY FOR TEKTRONIX CONPRTISLE DEVICES(U) 1 .-l 5 OPHIR CORP LAKENOOD CO J N WURNAN S9 AUG 05 SCIENTIFXC-3 AFOL-TR-86-9914 UNCLASSIFIED F/11 14,/5 OL mhhhmhmoonsm mEmhEEEEEEohEI mohEmhhhhohhEI mhhnshhmhEmhEEI Iommmmmo

Upload: others

Post on 19-Oct-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

  • AD-Rl?3 905 R PLOTTING LIBRARY FOR TEKTRONIX CONPRTISLE DEVICES(U) 1.-l 5 OPHIR CORP LAKENOOD CO J N WURNAN S9 AUG 05

    SCIENTIFXC-3 AFOL-TR-86-9914UNCLASSIFIED F/11 14,/5 OL

    mhhhmhmoonsmmEmhEEEEEEohEImohEmhhhhohhEImhhnshhmhEmhEEIIommmmmo

  • ILL--

    1.

    % I

    S.:

    •. I.I -":4 . 54.

    JIIII.'-2-5 II2I li 0 r- . ..

    MICROCOPY RESOLUTION TEST CHART : '..m

    NATIONAL HUREAUJ OF STANDARDS 1963-A *, hI -

    -

    ...-.

    ,-F --.-.

    -.. ,-. . ,:. .. . C...:...t...,.....,t -. ..

  • AD-A17 3 985AFGL-TR-86-0014

    A PLOTTING LIBRARY FOR "T"CTEKTRONIX COMPATIBLE DEVICES -LECTE

    NOV 0319W61

    Joshua M. Wurman D

    D*

    OPHIR Corporation7333 West Jefferson Avenue, Suite 210Lakewood, CO 80235

    SCIENTIFIC REPORT NO. 3

    8 August 1985 -

    Approved for public release; distribution unlimited.

    SAIR FORCE GEOPHYSICS LABORATORYAIR FORCE SYSTEMS COMMAND .

    UNITED STATES AIR FORCE P, WA

    HANSCOM AFB, MASSACHUSETTS 01731

    ,- . - '

    ts6 ~i 3 025 ::.... .. .h. .. ... -....... ,... -..... ....... ' ....- % .,%% %%.... .1 . % ,.. %%,..

    _.,f' - .e_ a, .,.a A -...'r \_.

  • "This technical report has been reviewed and is approved for publication" .

    -- - -- ~- - -- -- - -~ - - -°.

    . .. -

    - .

    BARBARA A. MAIN ARNOLD A. BA KES, JR., Chief

    Contract Manager Cloud Physics Branch

    FOR THE COMMANDER

    ' 4

    ~r A. McCLATCHEY, DirectorAtmospheric Sciences Division

    This report has been reviewed by the ESD Public Affairs Office (PA) andis releasable to the National Technical Information Service (NTIS).

    Qualified requestors may obtain additional copies from the Defense TechnicalInformation Center. All others should apply to the National TechnicalInformat ion Service.

    If your address has chaned, or if you wish to be removed from the mailinglist, or if the addressee is no longer employed by your organization, pleasenotify AFGL/DAA/LYC, Hanscom AFB, MA 01731. This will assist us in maintain-ing a current mailing list.

    -. 7

  • UNCLASS IFIED

    SECURITY CLASSIFICATION OF THIS PAGE

    REPORT DOCUMENTATION PAGEa. REPORT SECURITY CLASSIFICATION 1b. RESTRICTIVE MARKINGS

    * Unclassif ied ______________________20. SECURITY CLASSIFICATION AUTHORITY 3. OISTRI BUTION/AVAi LABILITY OF REPORT

    2. OCLASSiFICATION/OOWNGRAOINGSCHEOULE Apoe o ulcRlaedistribution unlimited

    4. PERFORMING ORGANIZATION REPORT NUMBER(S) 5. MONITORING ORGANIZATION REPORT NUMBERIS) *

    AFGL-TR-86-0014 .. *

    Be. NAME OF PERFORMING ORGANIZATION Is, OFF ICIE SYMOL 7a. NAME OF MONITORING ORGANIZATION(if appicable

    OPHIR Corporation (f,) Air Force Geophysics LaboratoryP%

    46-- ADDRESS (City. State and ZIP Code) 7b. ADDRESS (City. Stat and ZIP Code)

    7333 West Jefferson Avenue, Suite 210 Hanscom AFB, Massachusetts 01731

    Lakewood, CO 80235 Monitor/Barbara A. Main/LYCIs. NAMIE OfFPUNOINGJSPONSORING 8b. OFFICIE SYMBOL 9. PROCUREMENT INSTRUMENT IDENTIFICATION NUMBER

    ORGANIZATION (IIPdtgab0)F19628-83-C-0130

    Be. ADDRESS (City. State and ZIP Code) 10. SOURCE OF FUNDING MOS.

    PROGRAM PROJECT TASK WORK UNITELEMENT NO. NO. NO. NO.

    11. TITLE (include Seurity cla-iotalo) A Plotting Library 62101F 6670 12 CAi. for Tektronix Compatible Devices ______ ________________

    12. PERSONAL AUTHOR(S)

    Joshua Wurman13a, TYPE Of REPORT 1366 TIME COVERED 14. DATE OF REPORT (Yr., Mix, D~ay) PAG. COUNT f 4

    Sci. Rnt. No. 3 FROM _____6714. SUPPLEMENTARY NOTATION

    17. COSATI COOES I& SUBJECT TERMS lContinue on nwrere ifnecomary end identify by block num~ber)FIELD GROUP Sun. GR. F

    0 02Graphics, Tektronix, Plotting, Vax

    1,. ABSTRACT tWonlinu.. on rwo it 'wceautry mid identify by block numnber)

    This report contains documentation of a plotting library. This librarycontains FORTRAN callable subroutines that enable the creation of plotson Tektronix compatible terminals. This report includes a discussionof the library, a sample plotting session, and documentation of the routines.

    20. OIST041BUTIONIAVAILABILITY OF ABSTRACT 121. ABSTRACT SECURITY CLASSIFICATION%

    UNCLASSIFIED/UNLIMITEO MSAME AS RPT. 0 DTIC USER4S 0 Unclassified22&. NAME OF RESPONSIBLE INDIVIDUAL 22b, TELEPHONE NUMBER 22c. OFFICE SYMBOL

    Barbara A. Maine67377-94 Y

    DO FORM 1473, 83 APR EDITION OF I JAN 73 IS OBSOLETE. UCASFESECURITY CLASSIFICATION OF THIS PAGE

  • Page 3

    'N

    , h

    Table of Contents

    I. Introduction 4

    II. Definition of Terms 5 .

    III. Operating Procedures 6 L. _

    IV. Sample Plotting Session 7 .-..

    V. Documentation of Routines 8-67in alphabetical order -.--

    *. .,.

    NTIS CRA&IDTIC TAB C}Uannoin;ced _'

    ........... . ........ '

    B y .......... .. .............. . ............ ,' . ,..

    Dist, ib.tioi I

    Avoi~abiity Codes " "

    1 Av A J..dIorDO i.

    Ad

    , - " " ,6- -A V- ' -

  • Page 4

    I. Introduction

    This report documents a plotting library for use withTektronix terminals and emulators connected to Digital EquipmentCompany VAX computers using the VMS operating system. Thelibrary contains user callable routines that perform graphical %%manipulation on the screen, draw lines and markers, and contourdata.

    This work was conducted under contract with the Cloud PhysicsBranch, Atmospheric Sciences Divison, of the Air Force GeophysicsLaboratories

    The routines in the library have been designed primarily forthe Tektronix 4115B. Many of them will work on other terminals,but some, notably the routines that act on colors, the dialogarea, and segments, may work only partially or not at all.

    The library contains both higher and lower level routines.The higher level routines that are commonly called by userprograms do things like contour arrays, draw axes, plot stringsof text and change colors and visibilities of objects. Lowerlevel routines control output and data encoding and are usuallyonly called by the higher level routines in the library.

    The most likely routines to be called by a high level userprogram are:

    --T BEG and T END which must be called to initialize andterminate plotting,

    --T MARK and TLINEM which plot markers and lines, .,

    --T BSEG, T ESEG, T PSEG, T TSEG, T VSEG, T KSEG which begin, "- 'end, move, transform, set-visibility, and-kill graphicalobjects called segments,

    --T DACHAR, T DAIND, T DALIN, and T DAPOS which set thedialog area-width, color, number of lines, and position,

    --T LCHAR and T SCHAR which change the dialog area character % % %size,

    --TSTRNG which plots a string of text,

    --TPANEL which draws a filled panel,

    --T PRINT which prints the screen,

    --T CONTOUR and T AXES are powerful contouring and axeslibelling routines. T AXES is documented at the end ofthe alphabetical documentation

    There are many other routines that are used primarly by othermembers of the library. These are documented here so that newroutines that are written and added to the library can use themto do low level actions. .7-'.2.

    ,.-..°

    * - -. -. -p - ..,* - - - - .,

  • I7Page 5

    11. Definition of terms

    Although familiarity with the Tektronix 4115B is assumed, someterms are defined here because they are used extensivelythoughout this documentation. if extensive use is made of the4115, the 4110 Command Reference manual, the 4115B operators andHost Manuals should be consulted. The Command Reference Manualcontains a comprehensive list of all valid commands as well aslists of colors, line styles, marker types, and panel fillpatterns.

    Dialog area: This is a plane that "floats" over thegraphics on the screen. Data, output, andcommands can be written to this plane withoutinterfering with the graphics below.

    Segments: A segment is a series of graphics commands or"primitives" that can be stored and manipulatedas a whole.

    Marker: This is a symbol like a plus sign, a diamond or apoint. A list is contained in the 4110 CommandReference Manual

    Panel: This is a polygon filled with a pattern or color.Patterns and colors are detailed in the 4100 CommandReference manual

    Alpha mode: In this mode, output is directed to the dialogarea.

    Vector mode: in this mode, output is directed to thegraphics area.

    e~ .0,

  • 7..,. ..

    Page 6

    III. Operating procedures

    To use this plotting library, a program must be linked with thelibrary, which now resides at DRA3:[WURMAN.TEK]TEKLIB.OLB.All routines and common blocks in this library have names that .begin with the letters "T ". Thus, in order to elimiate namingconflicts, it is recommendid that user routines and common blocksavoid names beginning with that sequence. Before running theprogram, the logical name PLOTIO must be defined. The definition - _of PLOTIO determines whether plots are sent to a file or to thescreen. (But, note that the file output option is not fullyfunctional in the current version of this library.) This isusually done with one of the following commands:

    DEFINE PLOTIO TT to send plots to the screenor

    DEFINE PLOTIO PLOT.DAT to send plots to a file

    The first plotting routine called must be T BEG and the lastroutine called must be T END. It is tnot necessary to fullyunderstand what they do, (they are discussed in thedocumentation) but, failure to call these routines may causeprogram execution to halt. I

    The terminal should be in alpha mode before any output is .*":sent to the dialog area. Most commonly called libraryroutines leave the terminal in that mode, but some of the lowerlevel ones such as T VECT and T OUT do not.

    - P,-.p... a,. .°

    %

    A %"

    a% - v

    :---.--,'.' : .".....,...-.--.".-','-.',..,- -,-v -, ..-.-.-...-.--.-..-... ,,....... .............-.... . ..... ,.-.....%,'*I'xLd.:' ,QI .A.i ,'. ,"

  • Page 7

    IV. Sample Plotting Session

    The following is an example of a program and a run sessionto plot a box on the screen.

    $ edt box.for ;create program

    C this program will make a box and store it in a segmentC

    integer*4 x(5) / 100, 500, 500, 100, 100 / !arrays forinteger*4 y(5) / 100, 100, 500, 500, 100 / 'box vertices

    call t beg !initialize plottingcall t-bseg( 1 ) !open segment 1call tlnsty( 0 ) !line type-0 (solid lines)call t-lnind( 4 ) !line index-4 (blue by default)call t-linem( 5, x, y ) !draw lines for boxcall teseg !close segmentcall t-end !terminate plottingend

    C *EXIT$ FORTRAN BOX ;compile program$ LINK BOX,DRA3:[WURMAN.TEKJTKLIB/LIB ;link to plot library$ DEFINE PLOTIO TT ;send output to screen$ RUN BOX ;run program to make plot 4-.

    - --

    ..4....

    5: -

    %."

  • Page 8 O

    V. Documentation of Routines E

    The following pages contain a description of all routines in

    the library, with the exception of TAXES (documented last,on page 65), in alphabetical order. r

    % C

  • A - A '. J P. .

    Page 9 -;

    TYPE: SUBROUTINE

    NAME: TALPHA

    PURPOSE: To set a Tektronix terminal to alpha mode

    DESCRIPTION: This subroutine will set a Tektronix terminal to

    alpha mode. The terminal mode is changed immediately.

    CALLING SEQUENCE: CALL T ALPHA

    INPUT: none

    OUTPUT: Calls T OUT to send appropriate sequence to terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none :--'SIDE EFFECTS: All pending plotting output being stored by

    TOUT

    will be sent to the terminal.

    RESTRICTIONS: none

    METHOD: An ASCII 31 is sent to the terminal with a call to

    T OUT. The output is forced to be immediate by using

    a-negative output length specifier.

    LANGUAGE: VAX-l FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua WurmanModified 7-Aug-1985 by Joshua Wurman

    sends a -1 length to T OUTto force immediate output

    -. m." -

    - A ~.,d" ., .

  • .. -°

    ,o

    Page 10

    TYPE: SUBROUTINE

    NAME: TALPHAD

    PURPOSE: To set a Tektronix terminal to alpha mode withoutforcing immediate output

    DESCRIPTION: This subroutine will set a Tektronix terminal to

    alpha mode.

    CALLING SEQUENCE: CALL T ALPHAD

    INPUT: none

    OUTPUT: Calls T OUT to send appropriate sequence to terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: An ASCII 31 is sent to the terminal with a call toT OUT.

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1985 by Joshua Wurman

    '

    %. -.. ,

    I .•.4 ..

    ...... ...... ...... .....

  • Page 11

    TYPE: SUBROUTINE

    NAME: TBEG

    PURPOSE: Initializes plotting

    DESCRIPTION: This subroutine assigns an I/O channel to the terminalor opens a file to receive plotting output and placesinformation in the COMMON BLOCK /T COMMON CHAN/concerning the I/O channel rumber and the-action taken. .. ,'

    If the first two characters of the translation of thelogical name PLOTIO are "TT" then an I/O channel isopened to the terminal and plots are sent ther2. Ifthey equal anything else, then a file with the nameof the translation of PLOTIO is opened and plots aresent there. - '- 4

    In addition, information about the action taken aboveis placed in a common block. This common block isused by other plotting output routines and is describedin more detail below.

    CALLING SEQUENCE: CALL T BEG

    INPUT: none K

    OUTPUT: A message indicating the action taken is sent tothe terminal.

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: /T COMMON CHAN/ contains a two byte integer whichcontains either the channel number assigned to theterminal or a 50 which is the logical unit numberassociated with the file that is opened. A thirdbyte contains either a •TRUE. if an I/O channel wasopened to the terminal or a FALSE. if a file wasopened.

    SIDE EFFECTS: If an error occurs during logical name translation,channel assignment, or file opening, program executionstops.

    RESTRICTIONS: Since only the first two characters of the translationof PLOTIO are checked, it is impossible to sendplots to a file with a name that starts with "TT...".

    METHOD: The system service TRNLOG is called to translate"PLOTIO". If the translation starts with "TT" thenthe system service ASSIGN is called to assign the ,.first available I/0 channel. If the translation begins ,Pwith anything else, then a file is opened with a LUN-50,CARRIAGECONTROL=LIST and RECL=1600.

    LANGUAGE: VAX-11 FORTRAN

    -, .'.1 J P * a ~ .~ .~~. -, ;*.

  • 3.~~. *'T 1 1477 2pi- .4 ,

    Page 12

    MODIFICATION HISTORY: Created 7-Nov-1984 by Joshua WurmanModified 12-Nov-1984 by Joshua WurmanSendo message to terminal telling ""-'"

    of action19-Nov-1984 by Joshua Wurman

    Opens file if beginning of PLOTIOis not "TT" places .FALSE. in 3rd ebyte of /CHAN/ if file and .TRUE. ct__if terminal

    29-Nov-1984 by Joshua Wurman -Program stops if there is an erroropening the file

    I.. -r

    '4%

    • ~..~ -... %

    " -"-. "-°-. ,p.°

    _* o " - . " - ., - * . " ' ..- . -,-. - -v. ". '.- ', --. ,. '. ". . . . - . ** ". * " U ... - .- -- . - • . . - . - . - , - . - , . . .U• ,

  • Page 13

    TYPE: SUBROUTINE

    NAME: TBHSEG

    PURPOSE: Closes the current segment and opens the next higher one

    DESCRIPTION: Closes the segment that is currently open and opens the .one that is next higher in number.

    CALLING SEQUENCE: CALL TBHSEG

    INPUT: none

    - OUTPUT: Calls T OUT to send appropriate sequence to terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends the "begin-next-higher-segment" command tothe terminal.

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    %o%

    '4N

    q . -

    '.;..- ll

  • Page 14

    TYPE: SUBROUTINE

    NAME: TBSEG

    PURPOSE: Opens a specified segmentN.

    DESCRIPTION: Opens the segment specified in the calling argument

    CALLING SEQUENCE: CALL T BSEG(SEGNUMBER)

    SEGNUMBER: Integer indicating which segment numberis to be opened

    INPUT: none

    OUTPUT: Calls T OUT and TINCOD to send appropriate sequence to

    terminal

    *ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    *COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends "begin segment" command to terminal with appropriatenumber code for the segment number by calling T_OUT andTINCOD

    LANGUAGE: VAX-11 FORTRAN

    *MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    -V

  • LL

    Page 15

    5%*,

    TYPE: SUBROUTINE

    NAME: TCOLM

    PURPOSE: Changes an entry in the color map of the terminal

    DESCRIPTION: Sets the hue, lightness and saturation of a specifiedcolor number to the specified values

    CALLING SEQUENCE: CALL TCOLM( COLNUM, COLHUE, COL_LIGHT, COLSAT)

    COLNUM: Integer containing the number of thecolor to be changed

    COL HUE: Integers containing the hue, lightness,COL-LIGHT: and saturation to be associated withCOL-SAT: the color number

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequencesto the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: The color specifying mode is changed to HLS.

    RESTRICTIONS: none

    METHOD: T OUT and T INCOD are called to send appropriate esequences to the terminal

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    -

    K 12

    -. 5 -

    "3.' '.

    S

    °"S.

    2""

    ° '. " .- " " ' '*. """" " , " .'. " '. *" *. ." " - '- '- .""- -""-'S ".- " """. '" " " " " "• •" • • " '

  • Page 16

    TYPE: SUBROUTINE

    NAME: TCONTOUR

    PURPOSE: To contour filled data arrays

    DESCRIPTION: This routine is a powerful color contouring routine.The caller has extensive control over the contouroutput. Most of the parameters that are passed tothis routine are contained in a control file describedbelow.

    CALLING SEQUENCE: CALL T CONTOUR ( FIRST SEGMENT , X DIMENSIONY DIMENSION , EXIT STATUS

    FIRSTSEGMENT: Integer containing the numberof the first segment to beused in the plot Thissegment contains the contours.The next higher numbered segmentcontains the extremum labels, ifany.

    X DIMENSION: Integers containing the dimensionsY-DIMENSION: of the array to be contoured

    EXIT-STATUS: Integer that will contain a oneif this routine exits sucessfullyor a minus one if there is anerror exit -

    In addition, a subroutine, T CONTOUR INOUT, should belinked to the program. This-routine-is called to allowfor boundary criteria to specified. A sample routine •" .is shown below. This sample will always return a.FALSE. which has no effect on T CONTOUR. If a •TRUE.is returned, than contours will not be drawn in thegrid point specified.

    CC Sample TCONTOUR INOUT that always returns an in bounds indicationC

    C SUBROUTINE T CONTOUR INOUT ( RI , RJ , OUT )C - - ,.C RI, RJ are four byte floating point numbers which contain a gridC point location that corrosponds to data gridpointC (Rl*l,RJ+I)

    . C OUT is a one byte logical value which should be .TRUE. forout of bounds points and .FALSE. for in bounds points.

    CLOGICAL OUTOUT-.FALSE.

    CC This block of code would leave a blank space for a labelC 4C IF (RI.LT.30.AND.RI.GT.20.AND.RJ.LT.30.AND.RJ.GT.20)C 1 THENC OUT-.TRUE.

    1.4

    ..-A.'

  • .p ....

    Page 17

    C ELSEC OUT-.FALSE. '4C END IFC

    RETURNEND

    INPUT: Most parameters for the plot are read from the filewith the logical name CONTOURCTL which should be definedprior to calling this routine. This can be done witha command like, DEFINE CONTOURCTL CONTROL.DAT.The file should have carriage return record attributes(which is what EDT creates). All the data in the file(except for one number) has a format of I5, F11.4,or Al. All data, except for the arrayed numbers, begin %in the fourteenth column. The first two records in thefile are ignored and can be used for labelling,formatting, etc.

    An annotated copy of a sample control file follows.Note that any annotation line that begins with ashould not actually appear in the file. Only thenumbered lines 1-39 should appear in a usable controlfile.

    IThis file is a sample control file for TCONTOUR2 5678901234567890 15 F11.4 Al3MARK +0000 !Only used for debugging: places marks on conts4IBW +0001 !Should be one: in future will disable segments...SMESH +0004 !sub-grid scale for smoothing (2-9) 4 is good

    !consumes program space: see restrictions6LOGFAC +0000 !Base ten logarithmic factor applied to data7NNC16 +0004 !Maximum of contours that can be plotted/16

    !consumes program space: see restrictions8CLABFRQ +0002 !Every CLABFRQ contour will be labelled9CINT +00200.0000 !Contour interval: if neg then zero cont omitted

    10ODDKAX +04000.0000 'Only every other cont over ODDMAX plotted

    !Ignored if ODDMAX is zero11CONLOW -00500.0000.'The lowest contour that can be plotted ,'-'..¢

    12CONHIGH +04000.0000 !The highest contour that can be plotted -..13FLAT +00000.0000 !Flat region contour supressing param (0.0-1.0)

    !if zero then no supression!if one then most contours are supressed

    14HILOTHR +00050.0000 :Only extrmemums that are HILOTHR different!than the nearest contour value are plotted

    15BYTEL L !Character plotted at minumums16BYTEH H !Character plottpi at maximums17HTCONTL +00020.0000 !Height of contour labels18HTHILOL +00020.0000 !Height of extremum value labels ....19HTBYTEL +00020.0000 !Height of extremum type (max, min) labels -.19.5NDCONT +0000 !Number of digits after decimal in cont labels VAN

    !Set to +0360 for wind dir format (000-360) .2ONDHILO +0000 !Number of digits after dec in extremum labels

    !Set to +0360 for wind dir format (000-360) .21NEXTCOL +0015 !Color of extremum value labels

    VI~ . %%V.~$ ~ ~V ~ .... p ° °..-, d . f. J *'.. '. ..- -.p ,.'.

    %- -... -4d:%•

    % ' '

  • A-' A•• - ---

    4:2.

    Page 18

    22NHILOCOL +0015 !Color of extremum type (max, min) labels23NLABCOL +0015 !Unused24IPRECLB +0002 !Precision of text used in labeling: usu two V'.25IBEGSEG +0003 !Unused -a-26EPS .0000177 !A small uncommon number: Note format .'

    * t !Used to adjust contours slightly _27MAXERRS +0250 !Max num of contouring errors before error exit -A

    !The CONT array below contains thirty contour level thresholds at which!line color and styles can be changed according to the STYL and COLRlarrays. Thus, in this example, the 2800 contour will use the 25th value!in the STYL and COLR arrays to choose line style and color!This array must be arranged in ascending order28 CONTl -00100.0000 +00000.0000 +00050.0000 +00100.0000 +00150.000029 CONT2 +00200.0000 +00250.0000 +00300.0000 +00350.0000 +00400.000030 CONT3 +00450.0000 +00500.0000 +00800.0000 +01000.0000 +01200.000031 CONT4 +01400.0000 +01600.0000 +01800.0000 +02000.0000 +02200.000032 CONTS +02800.0000 +03000.0000 +03200.0000 +03400.0000 +03600.000033 CONT6 +03800.0000 +04000.0000 +04200.0000 +04400.0000 +04600.0000

    !The STYL and COLR arrays corrospond to the CONT values%Thus the contours between the nth and n+lth CONT values are drawn with(the nth color and style (The 2800 contour would be in style-0,color-35)34 STYLl +0001 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0001 +000135 STYL2 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +000036 STYL3 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +0000 +000037 COLRl +0021 +0022 +0023 +0024 +0025 +0026 +0007 +0028 +0029 +003038 COLR2 +0031 +0032 +0033 +0034 +0035 +0036 +0037 +0038 +0039 +004039 COLR3 +0041 +0042 +0043 +0044 +0045 +0046 +0047 +0048 +0049 +0050

    End of control file

    OUTPUT: T CONTOUR produces a contour plot in the graphicsarea of the screen and messages about the plot statusin the dialog area

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: /TCONTOURSCREEN/ Contains 4 integers. The first two arethe x,y location of the lower left handcorner of the plot. The next two

    numbers are the width and height of theplot

    /T CONTOUR FIELD/ The data array to be contoured ispassed in this block. This block mustcontain (NX+2)*(NY+2) four bytefloating point numbers. This isfor extrapolation beyond the data

    boundaries that is performed. The datashould be sent in a contiguous form withno gaps. It should not be centered inthe array. It is recommended that it bepassed in a linear array with extraspace at the end. T CONTOUR will takecare of centering in the array.

    SIDE EFFECTS: Program execution may halt if passed array sizes don'tagree with the passed sizes in NX, NY and NCl6, or if

    a.%.

  • Page 19

    V,' there is no routine TCONTOUR INOUT linked to the image. e.

    All possible types of errors have not been examined.While there is some error checking, passing unreasonablevalues in the control file, or the call arguments cancause the program to make bad plots and possibly halt.

    RESTRICTIONS: Data values that are very close to contour values willcause occasional errors in contouring.

    METHOD: The array is searched for contours and they are tracedto completion. Data values are sometimes alterred if theyare very near contour values to prevent endless spiralingof contours. A bit mask of contours that have passedthrough particular gridpoints is used to prevent redrawingof contours. Cubic spline interpolation is used tocalculate a subgrid scale in order to create smoothercontour s..-.-.

    Data is passed through common block /T CONTOUR FIELD/and the control file with a logical naieof CONTOURTL and through calling arguments.

    Several internal subroutines, entries and functions,T CONTOUR DRAW I, T CONTOUR DRAW C, T CONTOUR EXTRPL, 4T-CONTOUR-EXTRPL FNC, T CONTOUR TNT I, T CONTOUR INTNEW, .T CONTOUR INTOLD, T NUMCAR, ana T CONTOURSRCHDR, .TCSETIC, TCSET-IG, T C SETSC. T C SET TC, andT-C-SET-CM are called to perform contour drawing ,. ..eit~apolation, interpolation, contour building,formatting, masking, and searching

    T CONTOUR INOUT is called to test for map boundaries

    " LANGUAGE: VAX-l FORTRAN ,..

    MODIFICATION HISTORY: Created 1984 by Joshua Wurmanfrom old version at MIT

    Modified 1985 by Joshua WurmanExtensive modifications tosubstitute MACRO routinesfor low level functionsenhance speed and reliability

    %

    ..4 '_.

  • i IePage 20 %.

    TYPE: SUBROUTINE

    NAME: TCONT240

    PURPOSE: To contour arrays and send output to a VT2404 emulating a Tektronix

    DESCRIPTION: See documentation on TCONTOUR for further

    description _

    CALLING SEQUENCE: CALL T CONT240 ( see T CONTOUR for arguments

    METHOD: Calls TLINE240 to draw lines

    LANGUAGE: VAX-1l FORTRAN

    MODIFICATION HISTORY: Created 1985 by Joshua WurmanV

    8-

    eI

  • Page 21

    TYPE: SUBROUTINES, ENTRIES, FUNCTION

    NAMqE: TCONTO-1_DRAW entries: T CONTOURDRAW_ ____ _ _ _TCONTOURDRAW C

    T CONTOUREXTRPL function: TCONTOUREXTRPLFNC

    T CONTOUR INT entries: T CONTOUR INT IT CONTOUR INTNEW -T-CONTOURINTOLD

    T CONTOURSRCHDIR

    TNUMCHR

    0PURPOSE: These routines are called by T CONTOUR toplot arrays. It is unlikely thiat theyI would ever be called by another routine.See the source code for documentation.They are included in the T CONTOUR source file.

    LANGUAGE: VAX-1l FORTRAN

  • Page 22

    TYPE: SUBROUTINE, ENTRIES

    NAME: TCSET entries: T C SET ICT-C-SET-SC - :"'T C SET IGT-C-SET-TC iii: i

    T-C-SET-CM Z''

    PURPOSE: These routi'nes are called by T CONTOUR to plotarrays. It is unlikely that tiey would ever becalled by another routine. Documentation isIncluded in the source code. They are containedin the file TCONTMAC source code file.

    LANGUAGE: VAX-Il MACRO

    .~~~~. .. . . . .-

    % .

    S. -. .' *'* ,...

    . .. _r_____

  • Page 23

    IYPE: SUBROUTINE

    NAME: T DACHAROF

    PURPOSE: To set the dialog area characters per lineDESCRIPTION: Sets the dialog area characters per line to the

    specified value

    CALLING SEQUENCE: CALL TDACHAR( CHARPERLINE )

    CHAR PER LINE: The number of characters per line

    INPUT: none

    OUTPUT: Calls T OUT, T INCOD, AND T DAVIS send appropriate "sequences to tFie terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: Makes the dialog area visible

    RESTRICTIONS: none S

    METHOD: T OUT and T INCOD are called to specify the charactersper line. T DAVIS is called with an argument of 1 inorder to reset the dialog area and make the changeseffective.

    LANGUAGE: VAX-lI FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    %

    , ,- .

    • .- .°

  • Page 24

    TYPE: SUBROUTINE

    NAME: TDAIND

    PURPOSE: Changes the color of the text and background in the 0dialog area

    DESCRIPTION: Sets the foreground, background and erase indices ,of the dialog area.

    CALLING SEQUENCE: CALL T DAIND( FORE COL, BACK COL, ERASE COL

    FORE COL: Integer containing the color index- of the text in the dialog area .. '-

    BACK COL: Integer containing the color indexof the dialog area background

    ERASECOL: Integer containing the color indexin which characters are erased in thedialog area

    INPUT: none

    OUTPUT: Calls T OUT, T INCOD, and T DAVIS to send appropriate V..sequences to tFie terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    , SIDE EFFECTS: Makes the dialog area visible

    RESTRICTIONS: none

    METHOD: Calls T OUT and T INCOD to set the dialog area colorsand thei calls T DAIND with an argument of 1 to resetthe dialog area and make the changes effective

    LANGUAGE: VAX-11 FORTRANMODIFICATION HISTORY: Created 1984 by Joshua Wurman

    .'X,

    .'.---,

    %

    I.

    0,

    -C "

  • It

    Page 25

    k TYPE: SUBROUTINE

    NAME: TDALIN

    PURPOSE: To set the number of lines in the dialog area

    DESCRIPTION: Sets the number of lines in the dialog area to aspecified value

    CALLING SEQUENCE: CALL TDAPOS( NUMBEROFLINES ) '

    NUMBER OF LINES: Integer containing thenumber of dialog area lines

    INPUT: none

    OUTPUT: Calls T OUT, T INCOD, and T DAVIS send appropriatesequences to tie terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: Makes the dialog area visible

    RESTRICTIONS: none

    METHOD: T OUT and T INCOD are called to specify the number ofdialog area-lines. T DAVIS is called with an argumentof 1 in order to reSeE the dialog area and make thechanges effective. .

    LANGUAGE: VAX-l: FORTRAN .- ,

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman ,

    *%

    4 *, *%

    , :;.L

    .- :..:-,

    :- :::

    • '.--:

  • Page 26

    TYPE: SUBROUTINE

    NAM E: TDAPOS

    PURPOSE: To set the position of the dialog area on the screen 0

    DESCRIPTION: Sets the lower left hand corner of the dialog area toa specified location in screen coordinates

    CALLING SEQUENCE: CALL T DAPOS( X POSIT, Y POSIT

    X POSIT: Integers containing the x and y position,Y-POSIT: in screen coordinates, of the lower

    left hand corner of the dialog area

    INPUT: none

    OUTPUT: Calls T OUT, T XYCOD, and T DAVIS send appropriate

    sequencis to tFie terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none I

    SIDE EFFECTS: Makes the dialog area visible

    RESTRICTIONS: none

    METHOD: T OUT and T XYCOD are called to specify the positionof the dialog area. T DAVIS is called with an argument .of 1 in order to reset-the dialog area and make thechanges effective.

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    W40

    4 . '=

  • Page 27

    TYPE: SUBROUTINE

    NAME: T DAVIS

    PURPOSE: To make the dialog area visible or invisible

    DESCRIPTION: Sets the dialog area visibility to the specifiedvalue %

    CALLING SEQUENCE: CALL T DAVIS ( VISIBILITY

    VISIBILITY: Integer containing a 1 to set the ...dialog area visible or a 0 to setdialog area invisible

    INPUT: none

    OUTPUT: Calls T OUT, and T INCOD to send appropriate sequencesto the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: If the dialog area is made visible, all pending changes -

    to the dialog area parameters are made effective. ",.

    RESTRICTIONS: none

    METHOD: T OUT and T INCOD are called to specify the number ofd~alog area-lines.

    LANGUAGE: VAX-il FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    *,°...

    4.'

    V.! "V"5. *5,4%

    S 'm, "4

    .'

  • Page 28S%

    TYPE: SUBROUTINE

    NAME: TEND

    PURPOSE: Terminates plotting

    DESCRIPTION: This routine sends all pending output to thedevice that is receiving plots and then eitherdeassigns the I/O channel to the terminal orcloses the plot file.

    . CALLING SEQUENCE: CALL TEND

    INPUT: none

    OUTPUT: Calls T OUTNOW to cause all pending outputto be sent

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: /T CONTOUR CHAN/ which is initialized in T BEGonly the third byte is used by this-subroutine

    SIDE EFFECTS: If an error occurs during the deassignment of the

    I/O channel, program execution stops.

    RESTRICTIONS: none

    METHOD: The third byte in /CHAN/ is tested. If it is TRUE.,the system service DASSGN is called to deassign theI/O channel to the terminal. If it is •FALSE., thenthe plot file is closed and saved.

    LANGUAGE: VAX-i FORTRAN

    MODIFICIATION HISTORY: Created 1984 by Joshua Wurman

    *12211..:

  • Page 29 %

    TYPE: SUBROUTINE %

    NAME: T ESEG

    PURPOSE: Closes the current segment

    DESCRIPTION: Closes the segment that is currently open for definition

    CALLING SEQUENCE: CALL TESEG

    INPUT: none

    OUTPUT: Calls T OUT to send appropriate sequence to terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends "close segment" command to the terminalby calling TOUT

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    -.

    241

    e,

    S -

    i .,

  • Page 30

    TYPE: SUBROUTINE

    NAME: TGBCLR

    PURPOSE: Changes the screen background color

    DESCRIPTION: Sets the graphics background color to the specified color

    CALLING SEQUENCE: CALL TGBCLR( HUE , LIGHTNESS , SATURATION )a...'

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequences tothe teriinal -

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    . METHOD: Sends a "change background color" command with a callto T OUT and then sends the three color parameters withsubsequent calls to T INCOD

    LANGUAGE: VAX-lI FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    r

    h ' C { .. .* % .*. . . .a . %- "-'--"

  • - r r. = ,

    Page 31

    TYPE: SUBROUTINE

    NAME: TINCOD

    PURPOSE: Sends encoded integers to the terminalDESCRIPTION: Encodes an integer into a one to three byte sequence

    and sends the code to the terminal

    CALLING SEQUENCE: CALL TINCOD( INTEGER

    INTEGER: Integer containing the integer to beencoded and sent to the terminal

    INPUT: none

    OUTPUT: Calls T OUT times to send appropriatesequences to the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: Only integers in the range -32768 to +32767 inclusivewill be encoded correctly in this routine.

    METHOD: INTEGER is encoded according the the rules describedin the Tektronix 4110 Series Command Reference manual. . ,Integers with magnitudes less than 16 are sent as one -byte; integers with magnitudes between 16 and 1023,inclusive, are sent as two bytes; integers with magnitudesgreater than 1023 are sent as three bytes. TOUT iscalled to send the correct sequence.

    LANGUAGE: VAX-11 MACRO

    MODIFICATION HISTORY: Created 7-Aug-1985 by Joshua Wurman

    A.,l

    -4°

    .- ,.

  • 4 -. 4"Page 32

    TYPE- SUBROUTINE

    NAME: TKSEG

    PURPOSE: To erase segments permanently

    DESCRIPTION: Deletes the specified segments from screen memory, makingthem permanently invisible and freeing screen memory for , -future segments * • '

    CALLING SEQUENCE: CALL T KSEG ( SEGMENT NUMBER )

    SEGMENTNUMBER: Integer containing the number ofthe segment that is to be deleted.Note that if a -1 is passed, allsegments will be erased.

    INPUT: none

    OUTPUT: T INCOD and T OUT are called to send appropriate sequencesto the terminal * .:.,,

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Calls T OUT and T INCOD to send a "kill segment" commandto the *Eerminal

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    ".4.

    "•F

    I4,-,

    2F i2

    ..F2 -

    , .

    • . 1.-4...

  • Page 33

    TYPE: SUBROUTINE

    NAME: T LCHAR

    PURPOSE: To make dialog area text small

    DESCRIPTION: Sets the alpha text writing mode to small %

    CALLING SEQUENCE: CALL T LCHAR

    INPUT: none '"; -"

    OUTPUT: Calls T OUT and T DAVIS to send appropriate sequence toterminaT

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLS

    COMMON BLOCKS: none I __4.. ,

    SIDE EFFECTS: Makes the dialog area visible .Empties buffer of all pending plot output .

    RESTRICTIONS: none

    METHOD: Calls T OUT with a second parameter of -2 in orderto send a two character sequence to the terminal .-immediately. T DAVIS is called with an argument of -one in order to-cause an immediate effect on the textsize. '-.'

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman.Modified 9-Mar-1985 by Joshua Wurman .

    sends sequence through T OUT with a .negative length for immeaiate output

    ,4.'. 4'.

    * ' " '

    * *,..9.

    ',*. -

    p"4%.'

    ° - . - . . . . . , , . . , "*44 '% .

    ... ... ......... ." " --- '- ',-.'- -" '." ".: .', _' ' : -< ' "./ ." _.. " .'._.' .' '.' '.' _-,'. ,'_ .' ." -" .-'. " ..'. 4-,. . -,.' .'

  • Page 34

    TYPE: 5LBRI'TNE

    NAME: T LINEM

    PURPOSE: To draw a line on the terminal

    DESCRIPTION: Connects a sequence of points, specified withx,y) pairs, on the terminal

    CALLING SEQUENCE: CALL TT.INE ( NUMBEROFPOINTS X _ARRAY Y _ARRAY

    NUMBER OF POINTS: Integer containing the numberof points to be connected

    X ARRAY: Integer arrays containing the x and yY ARRAY: coordinates of the points to be connected

    The points should be in one to onecor respondence

    INPUT: none

    OUTPUT: Calls TOUT to send appropriate sequences to the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: Program execution may halt if an attempt is made toconnect more than 1000 points in one call to this routine.

    The terminal is left in alpha mode.

    *RESTRICTIONS: The maximum number of points that can be connected duringone call to this routine is 1000. This limit is arbitraryand has been chosen to balance utility and use of space.

    METHOD: Since the number of characters that can be sent in oneoutput request is limited by factors that vary frommachine to machine and from time to time, this routine

    % sends a series of separate line draw requests. The numberof requests is dependent on the maximum number ofcharacters that can be sent at one time and the number ofpoints to be connected. Currently the former quantity isexplicitly set by a parameter statement in the routine.

    To formulate each line draw request, the routine puts an~enter vector mode" request at the beginning of a buffer.Then it loops through the points, encoding them in a twoto five byte format according to the conventions specifiedin the Tektronix 4110 Command Reference guide, and addsthe codes to the buffer. (The variable lenr .h codingtakes advantage of the fact that, if the highest or lowestorder bits of the location of a point just drawn are the

    1% same as those of the current point, then those higher o.lower order bits dont have to be sent for the current

    r~. point.) This continues until the points are exhausted orthe buffer reaches the maximum length that can be sent

  • Page 35

    with one output request. At that time an "enter vectormode" request is added to the buffer and T OUT is calledto send the buffer to the terminal. If moEre points remainthen the process is repeated as necessary.

    LANGUAGE: VAX-li MACRO

    MODIFICATION HISTORY: Created 1985 by Joshua Wurman '-

    .7.

  • U q.

    . ... .. . . . . -

    Page 36

    TYPE: SUBROUTINE

    NAME: T LNIND

    PURPOSE: To change line color

    DESCRIPTION: Sets the color in which future lines will be drawnDoes not affect lines already on the screen or inmemory

    CALLING SEQUENCE: CALL T LNIND( LINE COLORtelndrwg. ~~~LINE COLOR : Integer containing the line drawing - '-'' '

    color

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequencesto the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none -. - -*

    METHOD: Sends a "set line index" command with a call to T OUTand the specified line drawing color with a call ToT INCOD -

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    fr.. ",

    ,. o".V"

    % 4 ,

    '%I' . %,"

    ,- ;. 4.4.

    -',e ,, .".. .".e ... " ' .".%." .'--- .''o."".""-"," ."." ."•. -" .. •".,."• - "% - . '.". '_-' " -. '. "" .- •. ". "" °.". "2" "- •" •" '•' -" ,' % %'.*

  • %"' .. o

    Page 37

    TYPE: SUBROUTINE

    NAME: T LNSTY

    PURPOSE: To change line drawing style

    DESCRIPTION: Sets the style in which future lines will be drawn.'*,Does not affect lines already on the screen or inmemory

    CALLING SEQUENCE: CALL TLNIND ( LINE-STYLE

    LINE STYLE: Integer containing the line drawingstyle

    INPUT: none

    OUIPUT: Calls T OUT and T INCOD to send appropriate sequencesto the Eerminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends a "set line style" command with a call to T OUTand the specified line drawing style with a call to . -T INCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    * *.% ..

    .

    .e.-°.._

    .,* ~ 4 * - . . . . . . . . . . .. . . . . . . . . . .. ., ? .- '

  • .1 Page 38

    TYPE: SUBROUTINE

    NAME: TMARK

    PURPOSE: To plot symbols

    DESCRIPTION: Plots a specified number of markers in specified colorsand locations

    CALLING SEQUENCE: CALL T MARK ( X ARRAY , Y ARRAY , NUMBER , TYPE , COLOR)

    X ARRAY: Integer arrays containing the x,y locationsY-ARRAY: of each symbol to be plotted

    NUMBER: Integer containing the number of symbols tobe plotted

    TYPE: Integer containing the number code for thetype of symbol to be plotted

    COLOR: Integer containing the color in which the

    symbols are to be plotted

    INPUT: none

    OUTPUT: Calls T OUT, T LNIND, and T XYCOD to send appropriatesequences to tHe terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB -

    COMMON BLOCKS: none

    SIDE EFFECTS: Changes the line drawing color to the color specifiedfor the plotted markers.

    The terminal is left in alpha mode.

    RESTRICTIONS: none

    METHOD: This routine first sets the current marker plotting typewith a calls to T OUT and T INCOD. Then the color ofthe markers is set with a cill to T LNIND which, inaddition to setting the line color, sets the marker color.Then the terminal is sent into marker plotting mode witha call to T MMODE. Each x,y location passed in theX LOCATION and Y LOCATION arrays is encoded and sent tothe terminal with calls to T XYCOD. Finally, theterminal is set to alpha mode with a call to T OUT.

    LANGUAGE: VAX-ll FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua WurmanModified 7-Aug-1985 by Joshua Wurmancalls TMMODE to enter marker mode

    .' ,-

    •.°%

    --..- .. •

  • Page 39

    TYPE: SUBROUTINE

    NAME: TMMODE

    PURPOSE: To set a Tektronix terminal to marker mode.• ,

    DESCRIPTION: This subroutine will set a Tektronix terminal tomarker mode. The terminal mode is changed immediately.

    CALLING SEQUENCE: CALL TMMODE

    INPUT: none

    OUTPUT: Calls T OUT to send appropriate sequence to terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: All pending plotting output being stored by TOUT

    will be sent to the terminal.

    RESTRICTIONS : none- "

    METHOD: An ASCII 28 is sent to the terminal with a call toT OUT. The output is forced to be immediate by usinga negative output length specifier.

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 7-Aug-1985 by Joshua Wurman

    %. o'.

    V......-,

    ..4

    Lii

    >.,.

  • C.*%

    Page 40

    TYPE: SUBROUTINE

    NAMIE: TNUMCHR .~-

    PURPOSE:Called by TCONTOUR and T AXES to plot arrays and .-.draw axes. It encodes numbers into character format.It has not been tested outside of the limited usein the T COUNTOUR and T AXES calls and is thus notdocumentid here. See t~e T CONTOUR source code forfurther documentation.

    *LANGUAGE: VAX-11 FORTRAN

    1%.

  • Page 41

    TYPE: SUBROUTINE

    NAME: TMOVE

    PURPOSE: To move the cursor without drawing a line "..'

    DESCRIPTION: Moves the beam location to the specified positionin a "pen up" mode

    CALLING SEQUENCE: CALL TMOVE ( XLOCATION , YLOCATION

    X LOCATION: Integers containing x,y location

    Y-LOCATION: of the target location

    INPUT: none

    OUTPUT: Calls T OUT and TXYCOD to send appropriate sequences tothe terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends an explicit "move" command to the terminal withcalls to T OUT and T XYCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    5%%

    ..

  • Page 42

    TYPE: SUBROUTINE

    NAME: TOG

    PURPOSE: To send output

    DESCRIPTION: Sends output to the terminal or to the plot file

    CALLING SEQUENCE: CALL T OG ( BYTES OF OUTPUT

    BYTES OF OUTPUT: Integer containing the numberof bytes to be sent

    INPUT: none

    OUTPUT: Sends plot data to the terminal or to a file

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: /TCOMMONBUF/ contains the outpt buffer

    /T COMMON CHAN/ contains a two byte integer whichcontains either the channel number assigned to theterminal or a 50 which is the logical unit numberassociated with the file that is opened. A third bytecontains either a .TRUE. if an I/O channel was openedto the terminal or a .FALSE. if a file was opened.

    SIDE EFFECTS: If an error occurs during the QIO to the terminal, -'.'-program execution will halt

    RESTRICTIONS: none

    METHOD: If the integer in /T CONTOUR CHAN/ is TRUE. thena QIO is sent to the-terminal to write the bufferin /T CONTOUR BUF/, otherwise the buffer is written .to the file uing a write statement.

    is "

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua WurmanModified 1985 by Joshua Wurman %--writes files with 80 byte records if

    PLOTIO is pointed to a file--but, thisoption is not debugged yet

    -- renamed common blocks

    I;..

    * 4*4 * -. ,,* . ..• ... '" ' .'- .*-'"'"+" N .. -. +.- " . +---...--,, ' .,. . . .--,..- . -. .. ".- .. . .. . "-, , -- v ., --. -*:

  • Page 43

    TYPE: SUBROUTINE

    NAME: T OUT

    PURPOSE: To send output

    DESCRIPTION: T OUT decides whether to add plot output to a buffer,o to send it output to a device. The decision is basedon several factors:

    --If the output device is the user's terminal, then alloutput is sent immediately.

    --If the output length is passed as a negative value, allcurrent and stored output is sent immediately

    --If the output length is passed as a zero, all datacurrently in the buffer is sent immediately

    --If the buffer is full, then the output is sentimmediately.

    --Otherwise, the output is appended to the buffer. .'-:'

    CALLING SEQUENCE: CALL T OUT ( OUTPUT , OUTPUT LENGTH )

    OUTPUT: Character variable containing theoutput to be sent

    OUTPUT LENGTH: Integer containing :INS.--the number of characters to be

    if buffered output allowed--the negative of the number of

    characters to be output if allcurrent and pending output is tobe sent

    --zero if all pending output is tobe sent

    INPUT: none .

    OUTPUT: Calls TOG to send output if output is to be sent

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: /T COMMON BUF/ contains the output buffer and is sharedwith TOG

    /T COMMON CHAN/ contains a two byte integer which isignored by T OUT and a third byte which is .TRUE.if an I/O chinnel is opened to the terminal ora .FALSE. if a file is open

    N SIDE EFFECTS: none -'=

    RESTRICTIONS: none

    METHOD: If the output device it the terminal (ITT-.TRUE.) then* the output buffer is filled with the input characters

    and TOG is called.

    ,- - '.

    -p . .. .. - ," ._. :, ¢ ," ._. ' ."2 . a.,e _. , '2€ .' ._._ ._

  • Page 44

    Otherwise, If the output length is passed as zero then TOG is calledto send the pending buffer

    Otherwise, If the output length is negative, then the output isappended to the buffer and T OG is called to send it,unless the append action would overflow the buffer,in which case T OG is called to send the pending buffer ''Vand again after-the current output is placed in thebuffer

    Otherwise, the output is appended to the buffer,unless the append action would overflow the buffer,in which case T OG is called to send the pending bufferand the current-output is placed at the beginning ofthe buffer

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua WurmanModified 1985 by Joshua Wurman--calls TOG instead of old TO--renamed-common blocks

    4 ~.- *.* 4

    %- r°,

    ." °

    4:0_

    4-'..-. .. . . . . . ..

    , .". ."..= '.., . .. . . .. . . ,. . .. . .. . - . . . i. i. . . . . . . .. . . 4 4

  • Page 45

    TYPE: SUBROUTINE '.

    NAME: TOUTNOW

    PURPOSE: To send all pending output

    DESCRIPTION: This is the routine that progammers should use to finishplots etc. It causes the pending output buffer to besent to the output device. If all plotting is to beended, T END should be called instead.

    -e VCALLING SEQUENCE: CALL T OUTNOW

    INPUT: none- . -. 2"

    OUTPUT: Calls TOUT to send all pending output -

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB .

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Calls T OUT with a length argument of zero to force allpending output

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    I--%..,

    5 . *' *

    "%%2'

    %" 5.%

    *" %- .•"

    *5-*-.].-..a.

    '[:'-

    •.-

  • V.. .-'

    Page 46

    TYPE: SUBROUTINE

    NAME: T PANEL

    PURPOSE: Draws a filled polygon

    DESCRIPTION: Draws a panel with the specified boundries and fillingcolor, with or without drawing the panel boundary

    CALLING SEQUENCE: CALL T PANEL ( X ARRAY , Y ARRAY , NUMB OF VERTICESFILLING COLOR , BOUNDARY DRAW FLAG

    X ARRAY: Integer arrays containing the x,y locationsY-ARRAY: of the vertices of the panel to be drawn.-- Note: the first vertex should be repeated

    in the last x,y pair

    NUMB OF VERTICES: Integer containing the number ofpoints sent in X ARRAY and Y ARRAY

    ". This should be one more thantheK, number of vertices in the polygon

    FILLING COLOR: Integer containing a code to specifyhow the polygon is to be filledA negative number causes the panel tobe filled with the colorcorresponding to the absolute valueof the specified filling color. Apositive number causes the panel tobe filled with a pre-defined pattern

    BOUNDARYDRAWFLAG: Integer containing a one ifthe boundary of the polygon is

    to be drawn and a zerootherwise

    INPUT: none

    OUTPUT: Calls TPNCLR, T VECT, T OUT, T XYCOD, TINCOD, andTALPHA to send appropriate sequences to the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: The terminal is left in alpha mode

    -I* RESTRICTIONS: none ."_ _

    METHOD: T PNCLR is called to set the panel filling color. T VECT

    ii called to set the terminal to vector mode. T OUT, V.-T XYCOD, and T INCOD are called to begin the panel. Allt~e passed points are sent to T XYCOD to be sent to the ..terminal. T OUT is called to end the panel and TALPHAis called to-set the terminal to alpha mode.

    . LANGUAGE: VAX-I1 FORTRAN

    m.= -o"

    '-".- , .-.... ". ". " :,".. -.'..' "..'. " . ";" ".'. " l.'...'..'..'..' ;."".''-J/ / .. .' .. * ." " "°, %. v v' _''[ " " & ' "."-" ;..

  • * - -~ b. . - *** .. ~

    L-~ ~

    Page 47

    MODIFICATION HISTORY: Created 1984 by Joshua Wurmari

    *~

    .'- %.*~

    I-I--,

    I

    I

    ~ d.

    4

    ~L~S

    Ii.-~- *-.-*~;

    * .~. %*

    r

    L

    I-.'1

  • * op . ,~

    Page 48

    * TYPE: SUBROUTINE

    JkNAME: TPNCLRV

    PURPOSE: To set the panel filling color

    DESCRIPTION: Sets the panel filling color or style

    CALLING SEQUENCE: CALL T PNC" 2 ( COLOR

    COLOR: Integer containinig the filling color or -,style of future panels

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequences tothe terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Calls T OUT to send a "set fill pattern" command to the ,..terminal and then calls T INCOD to send the fill pattern

    LANGUAGE: VAX- 11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    A, . _ ,

    *° %'°.o °

    ............

    . .. . . . . . . . ..-v"".'".'.". .%"."." . .", .-. '".,....;. .,'',..'',".'.,"'...", ",", ' ",". ". . :., " .'

  • Page 49

    TYPE: SUBROUTINE

    NAME: TPREC

    PURPOSE: To enable low or high precision text writing in thegraphics area

    DESCRIPTION: Sets the graphtext precision to string or strokeprecision

    CALLING SEQUENCE: CALL T PREC ( PRECISION

    PRECISION: Integer containing a one if stringprecision is desired or a two ifstroke precision is desired.

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequencesto the Eerminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Calls T TOUT and T INCOD to send a "set graphtextprecision" command-to the terminal with the specified

    parameter

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    .. p.

    ",-. .

    e %r

    4 .°5 .-p%

  • . . . . .. . . . . . . . . . . . .

    Page 50

    TYPE: SUBROUTINE

    NAME: TPRINT .'-

    PURPOSE: To print the screen

    DESCRIPTION: Causes a hardcopy of the screen to be produced witheither a positive or negative background

    CALLING SEQUENCE: CALL T PRINT ( BACKGROUND CODE

    BACKGROUNDCODE: Integer containing a zero or aone if a normal hardcopy is desiredand a two if a reversed backgroundcopy is desired

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequences tothe terminal which, in turn causes a hardcopy to beproduced

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends a "hardcopy" command with the appropriate parameterwith calls to T OUT and T INCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    4. -. -

    "., -V " ,-

    p,,.,.

    S * ~ ~ .. I.... ~ ... ,-

  • Page 51 . -

    TYPE: SUBROUTINE

    NAME: T PSEG

    PURPOSE: To move objects on the screen

    DESCRIPTION: This routine will move a specified segment's pivot i%point to the specified location.

    CALLING SEQUENCE: CALL TPSEG ( SEGMENTNUMBER , XLOCATION , YLOCATION )

    SEGMENT NUMBER: Integer containing the number of thesegment to be moved

    X LOCATION: Integers containing the x,y locationY-LOCATION: to which the segment is to be moved

    INPUT: none

    OUTPUT: Calls T OUT, T INCOD, and T XYCOD to send appropriatesequences to t]e terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends a "set segment position" command to the terminalwith calls to TOUT, TINCOD, and T XYCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    ,%p

    4a ...

    . 0 %

  • Page 52

    TYPE: SUBROUTINE

    NAME: TRECOD

    0 .. PURPOSE: To encode real numbers and send them to the terminal -

    DESCRIPTION: Encodes a specified real number into valid mantissaand exponent integers that can be sent to the terminal _*4 -,

    CALLING SEQUENCE: CALL T RECOD ( REAL NUMBER )

    REAL NUMBER: Four byte real number containing """'..the number to be sent to the terminal

    INPUT: none

    OUTPUT: Calls T INCOD to send the mantissa and exponent to theterminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: This routine uses a scheme that closely paralllels thatdescribed in the Tektronix 4110 Command Reference guidefor encoding real numbers. The real number is broken downinto a base-two integer mantissa and exponent and thenboth of these are sent to the terminal with calls toT INCOD.

    LANGUAGE: VAX-i1 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman -

    -A

    p..

    01

    Am

    Pa

    4,%* -.

    I...-,"

  • : .

    Page 53

    TYPE: SUBROUTINE

    NAME: TRFRSH

    PURPOSE: Clears the screen

    DESCRIPTION: This routine will clear the screen of all graphicalobjects that are not stored in segments -

    CALLING SEQUENCE: CALL T RFRSH

    INPUT: none

    OUTPUT: Calls T OUT and TINCOD to send appropriate sequences tothe teriinal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    - SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Calls T OUT to send a "renew view" command to the terminaland calls T INCOD to send an argument of zero

    LANGUAGE: VAX-l1 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua WurmanModified 7-Aug-1985 by Joshua Wurmansends an argument of zero to specifythe current view

    % -a ,w.

    ---_a.

    ?.* .-..

    S ..-4;.....; .. ... .,; ...,.. . ": " -"-. '- . , '. .' ,? --..-.'-....- .. ., .-.. - ., .,.-, , -. -, .. .. ... .., .- -, - - . - -, .:-,:,

  • %..A .0

    Page 54

    TYPE: SUBROUTINE

    NAME: T ROT

    PURPOSE: Sets the text rotation angle

    DESCRIPTION: Sets the graphtext rotation angle for future graphtextoutput

    CALLING SEQUENCE: CALL T ROT ( ANGLE

    ANGLE: Four byte floating point number containingthe angle, in degrees, that future graphtext

    should be rotated

    INPUT: none

    OUTPUT: Calls T OUT and TRECOD to send appropriate sequences to .

    the teriinal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Calls T OUT to send a "set graphtext rotation" command

    and TRECOD to send the rotation angle

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    r ..-..,

    ,:. r...'...

    .. : , '-,s

  • Page 55 ,p

    TYPE: SUBROUTINE . .1

    NAME: TSCHAR

    PURPOSE: To make dialog area text large

    DESCRIPTION: Sets the alpha text writing mode to large "

    CALLING SEQUENCE: CALL T SCHAR

    INPUT: none

    OUTPUT: Calls T OUT and T_DPVIS to send appropriate sequence toterminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: Makes the dialog area visibleEmpties buffer of all pending plot output

    RESTRICTIONS: none

    METHOD: Calls T OUT with a second parameter of -2 in orderto send-a two character sequence to the terminalimmediately. TDAVIS is called with an argument ofone in order to cause an immediate effect on the textsize.

  • L %:

    Page 56 .

    TYPE: SUBROUTINE

    NAME: TSTRING -6.r

    PURPOSE: To plot strings of characters

    DESCRIPTION: This routine will plot character strings of 'specified height, color, rotation, and precision .at specified locations.

    CALLING SEQUENCE: CALL TSTRNG ( XLOCATION , Y LOCATION , HEIGHTCHARACTER STRING , ROTATION ANGLE "NUMBEROFCHAR , PRECISION ,-COLOR

    X LOCATION: Integers containing the x,y locationY-LOCATION: of the lower left corner of the string

    HEIGHT: Integers containing the height of theprinted characters .

    CHARACTERSTRING: Character variable containingthe character string

    ROTATION ANGLE: Four byte floating point numbercontaining the angle in degreesthat the string is to be rotated

    NUMBER OF CHAR: Integer containing the number of

    characters passed inCHARACTERSTRING

    PRECISION: Integer containing a one for stringprecision characters and a two for strokeprecision characters

    COLOR: Integer containing the color index of thecharacters

    INPUT: none

    OUTPUT: Calls T VECT, TMOVE, TPREC, T TSIZ, T ROT, T TXCLR, -.-.T OUT, T INCOD, and T ALPHA to send appropriate sequencest the terminal -- '.4

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB . ..

    COMMON BLOCKS: none

    SIDE EFFECTS: Leaves the terminal in alpha mode .

    RESTRICTIONS: none -.

    METHOD: The active position is moved to the specified locationwith a call to TMOVE, the text attributes are setwith calls to T PREC, T TSIZ, T ROT, and T TXCLR, andthen the character string is seint to the terminal usingT OUT.

    ~ s'S.~ D° ° - .°.-.

  • V. 77 ., W

    Page 57

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    VV

    44

  • .. ".. Ji

    Page 58 ".. "i-.

    TYPE: SUBROUTINE

    NAME: TTBCLR

    PURPOSE: To set the string precision text background and thecolor in dashed line gaps

    DESCRIPTION: This will set the background that appears behind

    characters sent in string precision mode. It willalso Set the color that is drawn in the gaps of dashedlines.

    CALLING SEQUENCE: CALL TTBCLR ( TEXT BACKGROUND COLOR- DASHEDLINEGAPCOLOR

    TEXTBACKGROUNDCOLOR: Integer containingthe color index to bedisplayed behind stringprecision text

    DASHEDLINE GAP COLOR: Integer containingthe color index to be .,displayed in the gapsof dashed lines

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequencesto the terminal-

    ACCESS: The calling program must be linked to LIb£:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none -*,'

    RESTRICTIONS: none

    METHOD: This sends a "set background indices" command withcalls to T OUT. The parameters are sent with calls .,to T INCOD.

    LANGUAGE: VAX-lI FORTRAN ,,,

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    .4.

    -' -' / ." . * .- ,. * - . -, ' '..o .. -- --. .--..- . -, - \ -. 44

  • Page 59

    TYPE: SUBROUTINE

    NAME: TTSEG

    PURPOSE: To move and modify segments

    DESCRIPTION: This will move, rotate and scale segments

    CALLING SEQUENCE: CALL T TSEG ( SEGMENT NUMBER, X SCALE , YSCALEROTATION ANGLE , X LOCAT , Y LOCAT

    SEGMENT NUMBER: Integer containing the numberthe segment to be altered

    X SCALE: Four byte floating point numbers containingY-SCALE: the x and y scaling factors Numbers -'

    greater than one stretch the segment, _numbers less one compress it.

    ROTATIONANGLE: Four byte floating poing numbercontaining the angle through whichthe segment is to be rotated

    X LOCAT: Integers containing the x and y location I_Y-LOCAT: to which the pivot point of the segment .. ,

    is to be moved

    INPUT: none

    OUTPUT: Calls T OUT, T INCOD, T RECOD, and T XYCOD to sendapproprTate sequences to the terminal I .,

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none "

    METHOD: Sends a "set segment image transform" command to theterminal will calls to T OUT, T INCOD, T RECOD, andTXYCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    .|- 4 .--.--

    ......-...

    WAN ,..

    WP .%,

  • .7~~~~~~~~~v 7777OI.Ig7--77"v N"

    -4 4%Page 60

    TYPE: SUBROUTINE

    NAME: TTSIZ

    PURPOSE: To set the graphtext size

    DESCRIPTION: Sets the graphtext height, width, and spacing accordingto a passed height value

    CALLING SEQUENCE: CALL T TSIZ( CHARACTER HEIGHT )

    CHARACTER HEIGHT: Integer containing the heightof future graphtext characters .The width will be set to 4/5of the height and the spacing .1..'between characters will beset to 1/5 of the height. ,. -

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequencesto the Eerminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none 4. .

    RESTRICTIONS: none

    * METHOD: Calls T OUT and T INCOD to send a "set graphtext size"command with paraieters of 4/5, 1, and 1/5 ofCHARACTER HEIGHT

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    ,4%

    PPq

    ,,

    ,.'. 4

    4

    .o

    .4 444

  • Page 61

    TYPE: SUBROUTINE

    NAME : TTXCLR

    PURPOSE: To set text colors

    DESCRIPTION: This will set the color index for future alphatext andgraphtext

    CALLING SEQUENCE: CALL TTXCLR ( COLOR ,

    COLOR: Integer containing the color index of futuretext

    INPUT: none

    OUTPUT: Calls T OUT and TINCOD to send appropriate sequences tothe terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends a "set text index" command with calls to TOUTand T INCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    ''p.

    • ,

    ,4e.

    ,"4

    ip..

    "tuI-"; -,-. V ,"-" .- -"-"-" -".. -.- .. - -;, .-.-- " -- " -. . -.-.. '". -.-.. "-"""" -.- . -..""""" ,". .""""""" - . . ' :'

    '-._,p. . ._,"- : , :"-_," ::,€ ..:: :'~¢::.:,S,'t:r:. '''" € ,2Z: : :'"':,-'. '"'":,..: :;:," , r _,: ," e= -?.,"..','',.:.'.""

  • Page 62

    TYPE: SUBROUTINE

    NAME: TVECT

    PURPOSE: To set the terminal to vector mode

    DESCRIPTION: This will set and leave the terminal in vector mode

    CALLING SEQUENCE: CALL T VECT

    % INPUT: none

    OUTPUT: Calls TOUT to send appropriate character to the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    ,". COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends an ASCII 29 (decimal) to the terminal witha call to TOUT

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    .116

    e.--

    '-,-..-

    ',p,

    4#...- v

    ._ y:

  • Page 63

    TYPE: SUBROUTINE

    NAME: TVSEG

    PURPOSE: To make segments visible and invisible

    DESCRIPTION: This will set a segment's visibility to on or off

    CALLING SEQUENCE: CALL T VSEG ( SEGMENT NUMBER , VISIBILITY % %

    SEGMENT NUMBER: Integer containing the number ofthe segment to be made visible orinvisible

    VISIBILITY: Integer containing a zero if the segmentis to be invisible or a one if thesegment is to be visible

    INPUT: none

    OUTPUT: Calls T OUT and T INCOD to send appropriate sequences to

    the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none

    RESTRICTIONS: none

    METHOD: Sends a "set segment visibility" command with calls to

    TOUT and TINCOD

    LANGUAGE: VAX-11 FORTRAN

    MODIFICATION HISTORY: Created 1984 by Joshua Wurman

    A'4

    I.

    .5..

    prT

    % • %5 ,

    • . . .'. ..-

  • .J .. .J % Vg ?- - -

    Page 64

    TYPE: SUBROUTINE

    NAME: T XYCOD

    PURPOSE: To send a location to the terminal

    DESCRIPTION: Sends an encoded x,y location to the terminal

    CALLING SEQUENCE: CALL T_XYCOD ( XLOCATION , YLOCATION

    X LOCATION: Integers containing the x,yY-LOCATION: coordinates of a point to be . -"

    sent to the terminal

    INPUT: none

    OUTPUT: Calls T OUT to send the encoded location to the terminal

    ACCESS: The calling program must be linked to LIBT:TKLIB.OLB

    COMMON BLOCKS: none

    SIDE EFFECTS: none ,

    RESTRICTIONS: none

    METHOD: This routine encodes the x,y location into a string offive ASCII characters according to the rules outlinedin the Tektronix 4110 Command Reference guide and sendsthe five characters with T OUT -

    LANGUAGE: VAX-11 MACRO

    MODIFICATION HISTORY: Created 1985 by Joshua Wurman ...

    ,e %

    *.) .1w,

    "'v .

  • Page 65

    TYPE: SUBROUTINE

    NAME: T AXES entries: T AXES GRAPHT-AXESGXFRM k

    PURPOSE: To draw labelled axes

    DESCRIPTION: Subroutine T AXES is useful for plotting a rectanglewith labelle3 axes to surround the contour map.It can also be used to plot axes for drawing graphsand scatter diagrams etc. .4

    CALLING SEQUENCE: CALL T AXES ( argument list shown below )

    RXI Minimum X value - left-hand side of X axisRX2 Maximum X value - right-hand sideRDX Step size between labelled X valuesXFMT Format string to use for X values

    This must include surrounding parentheses,and end with a zero byte (i.e., it is anASCII zero string)For example - '(F4.2)' or '(12)'** First Special Case - if the string starts

    with an 'L' rather than '(' then thenumbers RXI etc. are treated as logs tothe base 10, and 10**RXl etc. are plotted

    *out as the labelsSecond Special Case - if the string isjust '(YM)' then RXl must be a first yearand month (e.g., 8204) and RX2 must be afinal year and month (e.g., 8302). The

    axis will be labells with APR, MAY, etc.NTX Number of ticks in X per labelled value

    (If NTX-l, only labelled values are ticked)LDX A logical variable which is .TRUE. if the

    labelled values should have leading zeroesplotted

    WIDTH The width in pixelsof the base of the rectangle - i.e., thedistance from RXl to RX2. The bottom leftcorner of the rectangle will not be at theorigin - it will be shifted in and up anappropriate distance to allow for theaxis labelling

    XLAB Label for the X axis - an ASCII zero string

    RY1 Minimum Y value - bottom of Y axisRY2 Maximum X value - top of Y axisRDY Step size between labelled Y valuesYFMT Format string to use for Y values

    This must include surrounding parentheses,and end with a zero byte (i.e., it is an I.'ASCII zero string) VANFor example - 1(F4.2)' or '(12)'* First Special Case - if the string starts

    with an 'L' rather than '(' then theJ numbers RYl etc. are treated as logs to

    J

    I. ,

    V./. .

  • Page 66

    the base 10, and 10**RYI etc. are plottedout as the labels

    NTY Number of ticks in Y per labelled value W.(If NTY-1, only labelled values are ticked)

    LDY A logical rariable which is •TRUE. if the 'labelled values should have leading zeroesplotted %

    HEIGHT The height in pixelsof the rectangle - i.e., the distance fromRYl to RY2.

    YLAB Label for the Y axis - an ASCII zero string

    CHHT Height (pixels) of the characters usedfor the axis labels and numbersThis is also used to get an appropriatescale for the ticks etc.

    GRID A logical variable - if .TRUE., a completegrid is drawn at the X and Y labelled values

    TWOTIK A logical variable - if .TRUE., ticks areput on all 4 sides of the rectangle rather thanjust the bottom (X) and left (Y)

    BSTY Axis and tick line styleBCOL Axis and tick line colorXCOL X axis label colorYCOL Y axis label colorIBSEG beginning segment number: axes and labels

    are placed in different segments IBSEG andIBSEG+l

    IBW controls whether segments and color commandsare made. If IBW--l then no segments andcolors are made. This can be used formaking plots on black and white terminalswhich do not support segment memory.

    A sample call to T AXES to simply plot X and Z each from 0 to50 in steps of 10,-with 10 ticks per label (so that the ticksare spaced one unit apart) is:

    CALL T AXES( 0.0,50.0,i0.0,'(I2)',l0,.FALSE.,2000.,'X',1 0.0,50.0,10.0,'(12)' 10, .FALSE. ,2000. ,Y',2 20., .FALSE., .TRUE.,1,0,1,1,1,0)

    Note that the numbers labelling the axes are plotted in 12 for-mat and do not have leading zeroes; the rectangle is actuallya 2000 pixel square; the character height is 0.15 inch (a prettygood value); a grid is not plotted, but ticks are put on allsides of the box.

    T AXES has an entry point T AXES GXFRM which can be used totransform an (X,Y) value in-the ordinate/abscissa space to (X,Y)plot co-ordinates. For example, CALLT AXES GXFRM(RX1,RYI,XBOT,YLEFT) will return in XBOT the plotco-ordinate of the base of the rectangle, and in YLEFT the plot %co-ordinate of the left of the triangle. Clearly, by doing aseries of such calls for one can obtain points to be joined todraw a graph within the rectangle. There is also an entry point % IT AXES GRAPH (see the source program for details). • •

    "b" - AN

    ____._______ -______ o___ .-._. . .-.-.. ~ , ..

  • Page 67

    In the special case of logarithmic values in X or Y, the inputnumber is treated as a log value; in the special case of yearsand months in X, the input value must be I for the first month(left-hand side), incremented by 1 for each successive month.

    . INPUT: none

    . OUTPUT: Calls T BSEG, T ESEG, T STRNG, and T LINEM tocreate output on the teminal -_

    ACCESS: The calling subroutine must be linked with LIBT:TKLIB.OLB

    COMMON BLOCKS: none \,,-.:

    SIDE EFFECTS: Terminal may be left in alpha mode

    RESTRICTIONS: none

    METHOD: see source code

    LANGUAGE: VAX-I FORTRANd ~- .%*MODIFICATION HISTORY: Created in antiquity at MIT or Australia

    Modified 1984 by Joshua Wurmanmodified MIT version for VAX and Tektronix ...and colors and segments

    44.

    dA

    ." £'-"Vft ft.. . - -t.4

    **-.* *.p*-ft!

    %I%-

  • *~ .1

    I .~'.

    ~* *~.A.

    yI~

    *1*,.4 I -

    4.A.

    rF

    4.

    L

    /

    r i.4.41~

    - - -** -a .1 J ~ ~ ~ ... ~.- A.. **~ **- **- *~ **- -. .4 -. -~