C SAMPLE 2-DIMENSIONAL DISPLAY PROGRAM
C
C THIS PROGRAM RUNS ON THE WATRAN COMPILER. DO NOT USE ON
C THE DIGITAL F4 COMPILER.  ASSIGN DK1 TO -5 AT LOAD TIME.
C
C
C THIS PROGRAM WILL DISPLAY A DIAMOND CENTERED
C ON THE CENTRE OF THE SCREEN.
       LOGICAL LTPEN
       REAL ARRAY(4,4)
       INTEGER MODE,BEGIN,END,IVECT(200),FIRST,LAST,INT,SCALE
C
C NEST LINE DEFINES CO-ORDINATE SYSTEM
       COMMON/LIMITS/XMIN,XMAX,YMIN,YMAX
C
       XMIN=-5.
       XMAX=5.
       YMIN=-5.
       YMAX=5.
C
C WHERE, THE DIMENSION OF THE SCREEN IS 10 UNITS BY
C 10 UNITS, AND CO-ORDINATE (0,0) IS AT THE CENTRE
C OF THE SCREEN.
C
       CALL CLEAR(.TRUE.)
C THE DISPLAY IS INITIALIZED, WITH THE ANTI-SWIM
C BIT PLACED.
C
C FOLLOWING, A DIAMOND SHAPE IS DESCRIBED ON THE
C CO-ORDINATE MATRIX 'ARRAY', WITH VERTICIES AT
C POINTS: (5,0),(0,5),(-5,0),(0,-5)
C
C FIRST LINE+
       ARRAY(1,1)=5.
       ARRAY(2,1)=0.
       ARRAY(3,1)=0.
       ARRAY(4,1)=0.
       ARRAY(4,1)=5.
C SECOND LINE:
       ARRAY(1,2)=0.
       ARRAY(2,2)=5.
       ARRAY(3,2)=-5.
       ARRAY(4,2)=0.
C THIRD LINE:
       ARRAY(1,3)=-5.
       ARRAY(2,3)=0.
       ARRAY(3,3)=0.
       ARRAY(4,3)=-5.
C FOURTH AND FINAL LINE:
       ARRAY(1,4)=0.
       ARRAY(2,4)=-5.
       ARRAY(3,4)=5.
       ARRAY(4,4)=0.
C
C THE CO-ORDINATE MATRIX 'ARRAY', IS NOW CONVERTED
C TO THE DISPLAY FILE 'IVECT', WITH THE FOLLOWING
C PARAMETERS:
       MODE=1
       BEGIN=1
       END=4
       FIRST =1
       INT=7
       SCALE=1
       LTPEN=.FALSE.
C
C DEFINING FOUR LINES, STARTING WITH THE FIRST LINE,
C AND ENDING WITH THE FOURTH LINE.  THE INTENSITY 
C WILL BE THE BRIGHTEST: 7.  SOLD LINES, WITH EVERY
C POINT INTENSIFED ALONG THE LINES. FINALLY, LIGHT-
C PEN INTERRUPTS WILL BE IGNORED.
C
       CALL VECTOR(MODE,ARRAY,BEGIN,END,IVECT,FIRST,
     2 LAST,INT,SCALE,LTPEN)
C
C THE DIAMOND, NOW DESCRIBED ON THE DISPLAY FILE
C 'IVECT', WILL BE DISPLAYED USING 'DRAW':
C
       CALL DRAW(IVECT,FIRST,LAST)
C
C TO KEEP THE DISPLAY ON, UNTIL A CONTROL P (^P)
C IS ISSUED, A PAUSE IS INSERTED:
C
       PAUSE1
C 
       STOP
       END
C
C
C THIS PROGRAM IS AVAILABE ON THE LIBRARY DUMPTAPE
C WITH THE NAME: DEMO1 SRC
