// drawNightFlags.cpp   A main program that uses the drawings.h library
//                 to draw a night scene with some flags and a snowman
//                 under the stars
// 
// P. Conrad   Fall 2004, CISC181


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

int main(void)
{
  writeGnuplotFile("drawNightFlags.gnuplot", 
		   "drawNightFlags.dat",
		   "drawNightFlags.png",
		   25.0, 30.0);

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

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

  // Draw a German flag

  drawFlagPole(outfile,5,2,10);
  drawGermanFlag(outfile,5,10,2);

  // @@@ Add a french flag on a flag pole here
  


  // Draw a Texan flag

  drawFlagPole(outfile,15,2,10);
  drawTexasFlag(outfile,15,10,2);

  // @@@ Note that the snow man will be incomplete
  // @@@ until you make some changes to drawings.cpp

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

  outfile << "# Now draw some stars up in the sky " << endl;

  drawStar(outfile, 5, 20, 2, 12, 3, PI/2.0); // at 5,20 a star of radius 2, 
                               // 12 pointed, skip 3, pointed up

  drawStar(outfile, 13, 17, 1.5, 9, 3, 0); // at 13,17 a star of radius 1.5, 
                               // 9 pointed, skip 3, not rotated

  drawStar(outfile, 18, 21, 2, 13, 3, 0); // at 18,21 a star of radius 2, 
                               // 13 pointed, skip 3, not rotated


  // @@@ ADD THREE MORE STARS HERE
  // Choose where they go, and how many points and what skip value
  // you think looks best.  Everyone's picture should look a little different

  outfile.close();

  return 0;
  
}
