// drawSnowMen.cpp   A main program that uses the drawings.h library
// to draw some snowmen and a nice sun up the sky.
// P. Conrad   Fall 2004, CISC181


#include <iostream>
#include <fstream>
#include "drawings.h"
using namespace std;


int main(void)
{

  writeGnuplotFile("drawSnowMen.gnuplot", 
		   "drawSnowMen.dat",
		   "drawSnowMen.png",
		   20.0, 20.0);

  ofstream outfile("drawSnowMen.dat",ios::out); 

  if (!outfile)
    {
      cerr << "Couldn't open file; sorry!" << endl;
      exit(-1);
    }

  outfile << "# Draw a line of snowmen... " << endl;

  // @@@ PUT draw snow man inside a for loop.
  // Replace one or more of the actual parameters with
  // some expression involving a variable

  drawSnowMan(outfile, 1, 2, 4); 

  outfile << "# Put a sun up in the sky... " << endl;

  drawStar(outfile, 16, 16, 2, 17, 3, PI/2.0); // at 16,16 a star of radius 2, 
                               // 17 pointed, skip 3, pointed up (PI/2.0)

  outfile.close();

  return 0;
  
}
