Simple turtle graphics: Difference between revisions
m
remove hueshift()
(→{{header|Python}}: added "translated from") |
m (remove hueshift()) |
||
Line 26:
Rectangle(🐢, siz, siz)
# roof
Reposition(🐢, x - siz / 2, y - siz / 2)
Turn(🐢, -60)
Line 35 ⟶ 34:
doorheight, doorwidth = siz / 2, siz / 4
Pencolor(🐢, 0, 0, 0)
Reposition(🐢, x, y + doorheight / 2)
Rectangle(🐢, doorwidth, doorheight)
# window
windowheight, windowwidth = siz /3, siz / 4
Reposition(🐢, x + siz / 4, y - siz / 4)
Rectangle(🐢, windowwidth, windowheight)
Line 59 ⟶ 56:
for n in data # draw each bar in chart
barheight = n * siz / maxdata
Reposition(🐢, x, y - barheight / 2)
Rectangle(🐢, barwidth, barheight)
|