Merge pull request #18 from Marius-450/marius_improvements
multiple improvements : memory, functionality
This commit is contained in:
commit
be1e671f17
5 changed files with 623 additions and 713 deletions
1330
adafruit_turtle.py
1330
adafruit_turtle.py
File diff suppressed because it is too large
Load diff
|
|
@ -35,7 +35,7 @@ def hilbert2(step, rule, angle, depth, t):
|
|||
|
||||
turtle = turtle(board.DISPLAY)
|
||||
turtle.penup()
|
||||
|
||||
turtle.setheading(90)
|
||||
turtle.goto(-80, -80)
|
||||
turtle.pendown()
|
||||
hilbert2(5, "a", 90, 5, turtle)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ turtle = turtle(board.DISPLAY)
|
|||
unit= min(board.DISPLAY.width / 3, board.DISPLAY.height / 4)
|
||||
top_len = unit * 3
|
||||
print(top_len)
|
||||
turtle.setheading(90)
|
||||
|
||||
turtle.penup()
|
||||
turtle.goto(-1.5 * unit, unit)
|
||||
turtle.pendown()
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ starsize = min(board.DISPLAY.width, board.DISPLAY.height) * 0.9 # 90% of screen
|
|||
print("Turtle time! Lets draw a star")
|
||||
|
||||
turtle.pencolor(Color.BLUE)
|
||||
turtle.setheading(90)
|
||||
|
||||
turtle.penup()
|
||||
turtle.goto(-starsize/2, 0)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ starsize = min(board.DISPLAY.width, board.DISPLAY.height) * 0.9 # 90% of screen
|
|||
print("Turtle time! Lets draw a star")
|
||||
|
||||
turtle.pencolor(Color.BLUE)
|
||||
turtle.setheading(90)
|
||||
|
||||
turtle.penup()
|
||||
turtle.goto(-starsize/2, 0)
|
||||
|
|
|
|||
Loading…
Reference in a new issue