diff --git a/drawing.py b/drawing.py index 1c25ed8..610fb77 100644 --- a/drawing.py +++ b/drawing.py @@ -6,6 +6,8 @@ from turtle import * from math import sqrt +from superturtle.image import save_svg +from superturtle.movement import no_delay def fly(distance): "The turtle moves without drawing for a specified distance." @@ -56,7 +58,7 @@ def rotateleft(): def drawright(): "The turtle draws squares to the right." - for i in range(5): + for i in range(10): pattern() left(135) fly(85) @@ -64,7 +66,7 @@ def drawright(): def drawleft(): "The turtle draws squares to the left." - for i in range(5): + for i in range(10): pattern() right(45) fly(57) @@ -76,12 +78,17 @@ def draw(): drawleft() rotateleft() -"The turtle starts at a specific point and facing a specific direction, then performs the draw function." -penup() -goto(-180,180) -pendown() -left(180) -for i in range(3): - draw() +def draw_my_drawing(): + "The turtle starts at a specific point and facing a specific direction, then performs the draw function." + penup() + goto(-320,450) + pendown() + left(180) + for i in range(7): + draw() + +width, height = 816, 1056 +with save_svg(width, height, "drawing.svg"): + draw_my_drawing() input() \ No newline at end of file diff --git a/drawing.svg b/drawing.svg new file mode 100644 index 0000000..1684db1 --- /dev/null +++ b/drawing.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file