      SUBROUTINE acceleration(position,accel,GM)
      IMPLICIT NONE
      REAL*8 r2, r3, position(*), accel(*), GM
      INTEGER i
      r2 = position(1)*position(1) + position(2)*position(2)
      r3 = r2*sqrt(r2)
      DO i = 1, 2
         accel(i) = -GM*position(i)/r3
      END DO
      END
