Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- #include "svg.hh"
- #include "turtle.hh"
- using namespace std;
- int main(int args, char** argv)
- {
- Color hexagon(1,0,0);
- Color line(0,0,0);
- Turtle* t;
- if(strcmp(argv[1], "eps") == 0) t = new PSTurtle (1000, 1000);
- else if(strcmp(argv[1], "svg") == 0) t = new SVGTurtle (1000, 1000);
- t->setup();
- t->pencolor(hexagon);
- t->moveto(Point(t->get_width()/2,t->get_height()/2)).pendown().left(35).forward(100);
- for(int i=0;i<5;i++)
- {
- t->right(60).forward(400);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement