#!/usr/local/perl
#
# Run the "disk" program a number of times, computing the acceleration
#   due to a disk of material at a number of different distances from
#   the disk.   
#   Send a nicely-formatted result to stdout.
#
# MWR 2/24/2007

$debug = 0;

$num_intervals = 100;
$radius = 1.0;
$min_dist = 1.01;
$max_dist = 10.0;
$dist_multiplier = 1.02;

for ($dist = $min_dist; $dist <= $max_dist; $dist *= $dist_multiplier) {

  $cmd = sprintf "./disk %9.4e %9.4e %d", $dist, $radius, $num_intervals;
  $ret = `$cmd`;
  printf "%s", $ret;

}



exit 0;
