made a abstract shape using tiles.py, was fun

This commit is contained in:
jfer
2026-02-12 11:11:01 -05:00
parent 69a9553023
commit f7f97c3b6d
6 changed files with 48 additions and 33 deletions

36
tile.py
View File

@@ -10,18 +10,18 @@ def draw_tile_outline(size):
square(size)
def draw_squiggle(size):
forward(size/4)
pencolor("black")
left(90)
quarter_arc_right(size/4)
quarter_arc_left(size/4)
quarter_arc_left(size/4)
quarter_arc_right(size/4)
left(90)
fly(size/4)
left(90)
fly(size)
left(90)
forward(size/25)
pencolor("pink")
left(135)
half_arc_right(size * 2)
half_arc_left(size * 2)
half_arc_left(size * 2)
half_arc_right(size * 2)
left(135)
fly(size/2)
left(135)
fly(size/2)
left(135)
def fly(distance):
"Moves without drawing."
@@ -31,14 +31,14 @@ def fly(distance):
def square(size):
"Draws a square of side length `size`"
for side in range(4):
for side in range(9):
forward(size)
left(90)
left(135)
def quarter_arc_right(radius):
def half_arc_right(radius):
"Draws a quarter of an arc, turning to the right."
circle(-radius, 90)
circle(-radius, 180)
def quarter_arc_left(radius):
def half_arc_left(radius):
"Draws a quarter of an arc, turning to the left."
circle(radius, 90)
circle(radius, 180)