// drawPhillsPicture.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("drawPhillsPicture.gnuplot", 
		   "drawPhillsPicture.dat",
		   "drawPhillsPicture.png",
		   30.0, 50.0);

  ofstream outfile("drawPhillsPicture.dat",ios::out); 
  
  if (!outfile)
    {
      cerr << "Couldn't open file; sorry!" << endl;
      exit(-1);
    }
  
  outfile << "# Draw a nice house " << endl;
  
  drawHouse(outfile, 10, 1, 15, 20); 

  outfile << "# Put a Stop sign to the left " << endl;

  drawStopSign(outfile, 2, 1, 10);

  outfile << "# Draw a flag on a flagpole " << endl;

  drawFlagPole(outfile,35,2,20);
  drawUSFlag(outfile,35,18,4);

  outfile << "# Draw a snowman beside it " << endl;
  
  drawSnowMan(outfile, 40, 1, 6); 

  outfile << "# Draw a stickFigure beside it " << endl;
  
  drawStickFigure(outfile, 45, 2, 8); 

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

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

  outfile.close();

  return 0;
  
}
