home *** CD-ROM | disk | FTP | other *** search
- subroutine spot (x,y,ht,ich,ang)
- c **** Modified for Marine Geology Vax Unix system for use with
- c houston symbol routine.
- c Purpose: accept parameters from program written with old
- c Benson-Lehner spot calls and translate symbol code to the
- c equivalent symbol in the houston 'symbol' routine.
-
- c Graig McHendrie, March 7, 1984
-
-
- c ---- Initialize values for conversion from B-L spot integers
- c ---- to Houston integers. ----
- integer bls2hs (102)
- data bls2hs/
-
- c A B C D E F G H I J K L M N
- c (bl) 1 2 3 4 5 6 7 8 9 10 11 12 13 14
- & 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78,
-
-
- c O P Q R S T U V W X Y Z % @
- c (bl) 15 16 17 18 19 20 21 22 23 24 25 26 27 28
- & 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 37, 64,
-
- c & 0 1 2 3 4 5 6 7 8 9 $ ` <
- c (bl) 29 30 31 32 33 34 35 36 37 38 39 40 41 42
- & 38, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 36, 96, 60,
-
- c > ( ) ^ | - / ? ! ' ' . = ;
- c (bl) 43 44 45 46 47 48 49 50 51 52 53 54 55 56
- & 62, 40, 41, 94,124, 45, 47, 63, 33, 39, 39, 46, 61, 59,
-
- c (decim) 234 225 222 224 223 221 235 235
- c (octal) 352 341 336 340 337 335 353 354
- c : , _ th pi +- sa <- -> + * # oc tr
- c (bl) 57 58 59 60 61 62 63 64 65 66 67 68 69 70
- & 58, 44, 95, 10, 34, 43, 6, 6, 6, 43, 42, 35, 1, 2,
-
- c (decim)237 238 239
- c (octal)355 356 357
- c di sq ?? a b c d e f g h i j k
- c (bl) 71 72 73 74 75 76 77 78 79 80 81 82 83 84
- & 5, 0, 15, 97, 98, 99,100,101,102,103,104,105,106,107,
-
- c l m n o p q r s t u v w x y
- c (bl) 85 86 87 88 89 90 91 92 93 94 95 96 97 98
- & 108,109,110,111,112,113,114,115,116,117,118,119,120,121,
-
- c z [ ] \
- c (bl) 99 100 101 102
- & 122, 91, 93, 92/
-
- c ---- Set codes for '-', '"', '+', '_', '->'
- data ihyph/45/, idbq/34/, iplus/43/, iundr/95/, irarw/6/
-
- c Define statement function for rotating a symbol. ----
- rotat(angin,amt) = amod((angin+amt),360.)
-
- c ---- See if single character coming in. Probably most frequent. ----
- if (ich .lt. 0 .or. ich .gt. 239) then
- ic2 = ich
- c ---- Shift coordinates to bottom left corner.
- rang = .0174533 * ang
- cosa = cos (rang)
- sina = sin (rang)
- xx = x - ht*cosa/3. + 0.5*ht*sina
- yy = y - ht*sina/3. - 0.5*ht*cosa
- call symbol (xx,yy,ht,ic2,ang,1)
-
- c ---- Must be an integer code ----
- else
-
- c ---- Get rid of the problem cases first. ----
- if ( (ich.gt. 60 .and. ich.lt. 65) .or.
- & (ich.gt.221 .and. ich.lt.226)) then
-
- c ---- Special symbols that involve particular treatment:
- c ---- pi: construct by hyphyn with " under it.
- if (ich.eq.61 .or. ich.eq.225) then
- call symbol (x,y,ht,ihyph,ang,-1)
- call symbol (x,y,ht,idbq,rotat(ang,180.),-1)
-
- c ---- plus/minus: construct with overlaid '+' and '_'.
- else if (ich.eq.62 .or. ich.eq.222) then
- call symbol (x,y,ht,iplus,ang,-1)
- call symbol (x,y,ht,iundr,ang,-1)
-
- c ---- arrow to corner: rotate right arrow +45 degrees:
- else if (ich.eq.63 .or. ich.eq.224) then
- call symbol (x,y,ht,irarw,rotat(ang,45.),-1)
-
- c ---- left arror: rotate right arrow 180 degrees:
- else if (ich.eq.64 .or. ich.eq.223) then
- call symbol (x,y,ht,irarw,rotat(ang,180.),-1)
-
- end if
-
-
- c ---- The rest can be done by table lookup:
- else
- if (ich.lt.61 .or.
- & (ich.gt.64 .and. ich.lt.103)) then
- ic2 =bls2hs (ich)
-
- c ---- or by individual exceptions:
- else if (ich .eq. 221) then
- ic2 = 6
- else if (ich .eq. 234) then
- ic2 = 60
- else if (ich .eq. 235) then
- ic2 = 1
- else if (ich .eq. 236) then
- ic2 = 2
- else if (ich .eq. 237) then
- ic2 = 5
- else if (ich .eq. 238) then
- ic2 = 0
- else if (ich .eq. 239) then
- ic2 = 15
- end if
-
- call symbol (x,y,ht,ic2,ang,-1)
-
- end if
-
- end if
- return
- end
-