Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <string.h>
  3. #include "svg.hh"
  4. #include "turtle.hh"
  5.  
  6. using namespace std;
  7.  
  8. int main(int args, char** argv)
  9. {
  10. Color hexagon(1,0,0);
  11. Color line(0,0,0);
  12.  
  13. Turtle* t;
  14.  
  15. if(strcmp(argv[1], "eps") == 0) t = new PSTurtle (1000, 1000);
  16. else if(strcmp(argv[1], "svg") == 0) t = new SVGTurtle (1000, 1000);
  17.  
  18.  
  19. t->setup();
  20. t->pencolor(hexagon);
  21. t->moveto(Point(t->get_width()/2,t->get_height()/2)).pendown().left(35).forward(100);
  22.  
  23. for(int i=0;i<5;i++)
  24. {
  25. t->right(60).forward(400);
  26. }
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement