C
C=======================================================================
C
      SUBROUTINE RPSYMB(ISYMB,XX,YY,HEIGHT)
C
C-----------------------------------------------------------------------
      INTEGER ISYMB
      REAL XX,YY,HEIGHT
C Subroutine designed to plot centered symbols using CALCOPS graphic.
C
C Input:
C     ISYMB... Index of the symbol to be plotted.
C     XX   ... X coordinate of the center of the symbol.
C     YY   ... Y coordinate of the center of the symbol.
C     HEIGHT.. Vertical dimension of the symbol.
C No output:
C
C Subroutines and external functions required:
C     subroutine PLOT of the CALCOPS package.
C
C Date: 1997, August 20-th
C
C Coded by Petr Bulant
C
C.......................................................................
C
      REAL STUP
      PARAMETER (STUP=0.0174532)
      REAL AA,BB,CC,DD,EE,FF,GG,HH
      REAL HEIGH0
      SAVE AA,BB,CC,DD,EE,FF,GG,HH,HEIGH0
      DATA HEIGH0/0./
C     STUP ... Value of one degree in radians.
C     AA,..HH ... Auxiliary variables.
C     HEIGH0 ... Value of HEIGHT of the last invocation.
C-----------------------------------------------------------------------
C
      IF (ISYMB.EQ.0) THEN
C       Definitions:
        WRITE(97,'(A)') '%% Symbol definitions:                        '
        WRITE(97,'(A)') '/P101 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA add   YY     moveto                    '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P102 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX BB sub   YY BB sub  moveto                '
        WRITE(97,'(A)') ' XX BB add   YY BB add  lineto                '
        WRITE(97,'(A)') ' XX BB sub   YY BB add  moveto                '
        WRITE(97,'(A)') ' XX BB add   YY BB sub  lineto                '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P103 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX AA add   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P104 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX BB add   YY BB add  moveto                '
        WRITE(97,'(A)') ' XX BB add   YY BB sub  lineto                '
        WRITE(97,'(A)') ' XX BB sub   YY BB sub  lineto                '
        WRITE(97,'(A)') ' XX BB sub   YY BB add  lineto                '
        WRITE(97,'(A)') ' XX BB add   YY BB add  lineto                '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P105 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX YY AA 0 360 stroke arc                    '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P106 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX CC add   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX CC sub   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P107 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA add   YY     moveto                    '
        WRITE(97,'(A)') ' XX DD sub   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX DD sub   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX AA add   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P108 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA sub  moveto                    '
        WRITE(97,'(A)') ' XX CC sub   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX CC add   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P109 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA sub   YY     moveto                    '
        WRITE(97,'(A)') ' XX DD add   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX DD add   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P110 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX CC sub   YY DD add  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX CC add   YY DD add  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX      YY AA sub  moveto                    '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P111 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX DD add   YY CC add  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX DD add   YY CC sub  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX AA sub   YY     moveto                    '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P112 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX CC add   YY DD sub  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX CC sub   YY DD sub  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P113 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX DD sub   YY CC add  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX DD sub   YY CC sub  moveto                '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX AA add   YY     moveto                    '
        WRITE(97,'(A)') ' XX      YY     lineto                        '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P114 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX FF sub   YY EE add  moveto                '
        WRITE(97,'(A)') ' XX FF add   YY EE add  lineto                '
        WRITE(97,'(A)') ' XX HH sub   YY GG sub  lineto                '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX HH add   YY GG sub  lineto                '
        WRITE(97,'(A)') ' XX FF sub   YY EE add  lineto                '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P115 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX HH sub   YY GG add  moveto                '
        WRITE(97,'(A)') ' XX FF add   YY EE sub  lineto                '
        WRITE(97,'(A)') ' XX FF sub   YY EE sub  lineto                '
        WRITE(97,'(A)') ' XX HH add   YY GG add  lineto                '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX HH sub   YY GG add  lineto                '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P116 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX CC add   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX CC sub   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') ' XX      YY AA sub  moveto                    '
        WRITE(97,'(A)') ' XX CC sub   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX CC add   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P117 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA add   YY     moveto                    '
        WRITE(97,'(A)') ' XX DD sub   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX DD sub   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX AA add   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') ' XX AA sub   YY     moveto                    '
        WRITE(97,'(A)') ' XX DD add   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX DD add   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P118 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX CC 7 div add YY DD 7 div add              '
        WRITE(97,'(A)') ' XX CC add   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX      YY AA 7 div sub lineto               '
        WRITE(97,'(A)') ' XX CC sub   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX CC 7 div sub YY DD 7 div add              '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P119 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA add   YY     moveto                    '
        WRITE(97,'(A)') ' XX DD 7 div add YY CC 7 div sub              '
        WRITE(97,'(A)') ' XX DD sub   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX AA 7 div sub YY     lineto                '
        WRITE(97,'(A)') ' XX DD sub   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX DD 7 div add YY CC 7 div add              '
        WRITE(97,'(A)') ' XX AA add   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P120 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA sub  moveto                    '
        WRITE(97,'(A)') ' XX CC 7 div sub YY DD 7 div sub              '
        WRITE(97,'(A)') ' XX CC sub   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX      YY AA 7 div add lineto               '
        WRITE(97,'(A)') ' XX CC add   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX CC 7 div add YY DD 7 div sub              '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P121 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA sub   YY     moveto                    '
        WRITE(97,'(A)') ' XX DD 7 div sub YY CC 7 div add              '
        WRITE(97,'(A)') ' XX DD add   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX AA 7 div add YY     lineto                '
        WRITE(97,'(A)') ' XX DD add   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX DD 7 div sub YY CC 7 div sub              '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P122 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX BB 7 div add YY BB 7 div add              '
        WRITE(97,'(A)') ' XX AA add   YY     lineto                    '
        WRITE(97,'(A)') ' XX BB 7 div add YY BB 7 div sub              '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX BB 7 div sub YY BB 7 div sub              '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX BB 7 div sub YY BB 7 div add              '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P123 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA 7 div add moveto               '
        WRITE(97,'(A)') ' XX BB add   YY BB add  lineto                '
        WRITE(97,'(A)') ' XX AA 7 div add YY     lineto                '
        WRITE(97,'(A)') ' XX BB add   YY BB sub  lineto                '
        WRITE(97,'(A)') ' XX      YY AA 7 div sub lineto               '
        WRITE(97,'(A)') ' XX BB sub   YY BB sub  lineto                '
        WRITE(97,'(A)') ' XX AA 7 div sub YY     lineto                '
        WRITE(97,'(A)') ' XX BB sub   YY BB add  lineto                '
        WRITE(97,'(A)') ' XX      YY AA 7 div add lineto               '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P124 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX FF sub   YY EE add  moveto                '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX FF add   YY EE add  lineto                '
        WRITE(97,'(A)') ' XX HH add   YY GG sub  lineto                '
        WRITE(97,'(A)') ' XX HH sub   YY GG sub  lineto                '
        WRITE(97,'(A)') ' XX FF sub   YY EE add  lineto                '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P125 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX HH sub   YY GG add  moveto                '
        WRITE(97,'(A)') ' XX HH add   YY GG add  lineto                '
        WRITE(97,'(A)') ' XX FF add   YY EE sub  lineto                '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX FF sub   YY EE sub  lineto                '
        WRITE(97,'(A)') ' XX HH sub   YY GG add  lineto                '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P126 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX      YY AA add  moveto                    '
        WRITE(97,'(A)') ' XX      YY AA sub  lineto                    '
        WRITE(97,'(A)') ' XX CC add   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX CC sub   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX CC sub   YY DD sub  lineto                '
        WRITE(97,'(A)') ' XX CC add   YY DD add  lineto                '
        WRITE(97,'(A)') ' XX      YY AA add  lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P127 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX AA add   YY     moveto                    '
        WRITE(97,'(A)') ' XX AA sub   YY     lineto                    '
        WRITE(97,'(A)') ' XX DD sub   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX DD add   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX DD sub   YY CC add  lineto                '
        WRITE(97,'(A)') ' XX DD add   YY CC sub  lineto                '
        WRITE(97,'(A)') ' XX AA add   YY     lineto                    '
        WRITE(97,'(A)') ' XX      YY     moveto                        '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '/P128 {/YY exch def /XX exch def              '
        WRITE(97,'(A)') ' XX YY AA 0 360 stroke arc fill               '
        WRITE(97,'(A)') '                stroke} bind def              '
        WRITE(97,'(A)') '%% End of definitions.                        '
        RETURN
      ENDIF
      IF (ISYMB.GT.28) ISYMB=28
      IF (HEIGHT.NE.HEIGH0) THEN
        HEIGH0=HEIGHT
        AA=HEIGHT/2. *72./2.54
        BB=AA/SQRT(2.)
        CC=AA*SQRT(3.)/2.
        DD=HEIGHT/4. *72./2.54
        EE=AA*SIN(18.*STUP)
        FF=AA*COS(18.*STUP)
        GG=AA*COS(36.*STUP)
        HH=AA*SIN(36.*STUP)
        WRITE(97,'(A,F5.1,A)') '/AA ',AA,' def'
        WRITE(97,'(A,F5.1,A)') '/BB ',BB,' def'
        WRITE(97,'(A,F5.1,A)') '/CC ',CC,' def'
        WRITE(97,'(A,F5.1,A)') '/DD ',DD,' def'
        WRITE(97,'(A,F5.1,A)') '/EE ',EE,' def'
        WRITE(97,'(A,F5.1,A)') '/FF ',FF,' def'
        WRITE(97,'(A,F5.1,A)') '/GG ',GG,' def'
        WRITE(97,'(A,F5.1,A)') '/HH ',HH,' def'
      ENDIF
      WRITE(97,'(2F6.1,A,I3)') XX*72./2.54,YY*72./2.54,' P',100+ISYMB
      RETURN
      END
C