#!/usr/bin/perl
#
# Compute some data we can use to illustrate the idea
#     of wave pulses.
#
# MWR 2/8/2019

$debug = 0;

$mypi = 3.14159;

# fundamental frequency (rad/s)
$omega0 = 1.0;
# amplitude of fundamental frequency (m)
$amp0 = 1.0;
# starting time for the "wide" view (s)
$start_time_wide = 0.0;
# ending time for the "wide" view (s)
$end_time_wide = 100.0;
# sampling of the "wide" view (s)
$d_time_wide = 0.0004;

$sinc_center_freq = 1000.0;


printf "# first, the frequencies and amplitudes we'll add \n";
printf " i %5d   freq %8.3f  x %12.5f  amp %12.5f \n",  
              1, $sinc_center_freq, 1.0, 1.0;

printf "\n\n\n";




  # compute data for a sum of frequencies
  printf "# now, values of the single wave \n";
  for ($t = $start_time_wide; $t <= $end_time_wide; $t += $d_time_wide) {
 
     $val = $amp0*cos($sinc_center_freq*$t);

     printf " %12.5f %12.5f \n", $t, $val;

  }




exit 0;
