*S1002
c
c
      real*8 y, z
      character*80  utfil
c
      utfil = 'S1002.whe'
c
      open (02, file=utfil)
c
      do 100 i =  260, 1, -1
      y = i*.5d0 - 70.d0
 100  write (02,110)   -y,z(y)
 110  format (1x,f15.5,1x,f15.5)
      close(02)
      stop
      end
c
*z
      real*8 function z(y)
      real*8 y
c
      if (y.le.60.d0 .and. y.gt.32.15796d0) then
       z = 1.364323640 - .066666667*y
c
      elseif (y.le.32.15796d0 .and. y.gt.-26.00000d0) then
       z =
     & -3.358537058d-2*y     +1.565681624d-3*y**2  -2.810427944d-5*y**3
     & +5.844240864d-8*y**4  -1.562379023d-8*y**5  +5.309217349d-15*y**6
     & -5.957839843d-12*y**7 +2.646656573d-13*y**8
c
      elseif (y.le.-26.0000d0 .and. y.gt.-35.00000d0) then
       z = -4.320221063d3
     & -1.038384026d+3*y     -1.065501873d+2*y**2  -6.051367875d+0*y**3
     & -2.054332446d-1*y**4  -4.169739389d-3*y**5  -4.687195829d-5*y**6
     & -2.252755540d-7*y**7
c
      elseif (y.le.-35.0000d0 .and. y.gt.-38.426669071d0) then
       z = +16.446d0
     & -sqrt(13.d0**2 - (y+26.210665d0)**2)
c
      elseif (y.le.-38.426669071d0 .and. y.gt.-39.764473993d0) then
       z = -93.576667419d0
     & -2.747477419d+0*y
c
      elseif (y.le.-39.764473993d0 .and. y.gt.-49.662510381d0) then
       z = +8.834924130d0
     & +sqrt(20.d0**2 - (y+58.558326413d0)**2)
c
      elseif (y.le.-49.662510381d0 .and. y.gt.-62.764705882d0) then
       z = +16.d0
     & +sqrt(12.d0**2 - (y+55.000000000d0)**2)
c
      elseif (y.le.-62.764705882d0 .and. y.gt.-70.000000000d0) then
       z = +9.519259302d0
     & +sqrt(20.5d0**2 - (y+49.500000000d0)**2)
c
      else
       write(6,'(a)') ' ',' ***ERROR*** In S1002:',
     & '             Coordinate y is outside the wheel.'
      endif
c
      return
      end
