      PROGRAM P48 
C
C Problem 48/ spring 1998: Graph for current flow in the (z-y)-planes
C             (previously 46 in spring 96 and 40 in spring 95).
C
C Data -> fort.8 are then attached to p48.g
C
C Over-all picture: Only on those two planes there is a charge.
C                   It oscillates on each plane, but the to total
C                   total charge is conserved. The currents transprot
C                   it from one plane to the other in accordance with
C                   the continuity equation.
C
      IMPLICIT REAL*8 (A-H,O-Z)
      PARAMETER(IUOUT=6,IUDAT=8,NY=10,NZ=10,SIGN=-1.D0,EPS=1.D-10)
C
      PI=ACOS(-1.0D00)
      WRITE(IUOUT,*) '   '
      WRITE(IUOUT,*) 'Y,Z,AY,AZ: '
      WRITE(IUDAT,*) 'set nokey'
      DO IY=0,NY
      WRITE(IUOUT,*) '   '
      DO IZ=0,NZ
      Y=0.1D00*FLOAT(IY)
      Z=0.1D00*FLOAT(IZ)
C Components of the (y-z)-plane currents:
      AY=SIGN*COS(PI*Y)*SIN(PI*Z)
      AZ=SIGN*SIN(PI*Y)*COS(PI*Z)
      IF(ABS(AY).LT.EPS) AY=0.0D00
      IF(ABS(AZ).LT.EPS) AZ=0.0D00
      WRITE(IUOUT,100) Y,Z,AY,AZ
      AY=0.1D00*AY
      AZ=0.1D00*AZ
      Y2=Y+AY
      Z2=Z+AZ
      IF(Y2.LE.1.D0.AND.Z2.LE.1.D0.AND.Y2.GE.0.D00.AND.Z2.GE.0.D0) 
     & WRITE(IUDAT,101) Y,Z,Y2,Z2
100   FORMAT(1X,2G15.6,10X,2G15.6)
101   FORMAT(1X,'set arrow from',1F10.5,',',1F10.5,' to '
     & ,1F10.5,',',1F10.5)
      END DO
      END DO
      WRITE(IUDAT,*) 'plot 0'
C
      STOP
      END
