generated from mwc/project_drawing
I started the outlines of my books and the shelf.
This was just the beginning of my project. I did find myself wondering if there was a more efficent way of writing the code itself. I tried a few different ways, using different definitions and they all ended up being somehow less effective? So, I settled on going through the actual outlining of the books being manual. I did use docstrings to help myself have a place- holder for major changes and moves. My plan moving forward it to try and incorporate more definitions are create the shapes that will decorate the books themselves and create the texture of the shelf.
This commit is contained in:
parent
c6af0632fb
commit
56996424d5
60
drawing.py
60
drawing.py
|
@ -5,3 +5,63 @@
|
|||
# (Briefly describe what this program does.)
|
||||
|
||||
from turtle import *
|
||||
penup()
|
||||
right(180)
|
||||
forward(200)
|
||||
pendown()
|
||||
def rectangle(width,height):
|
||||
for _ in range(2):
|
||||
forward(width)
|
||||
left(90)
|
||||
forward(height)
|
||||
left(90)
|
||||
rectangle(20,100)
|
||||
left(180)
|
||||
forward(20)
|
||||
right(90)
|
||||
forward(100)
|
||||
right(180)
|
||||
forward(200)
|
||||
right(90)
|
||||
forward(40)
|
||||
right(90)
|
||||
forward(200)
|
||||
right(180)
|
||||
forward(215)
|
||||
right(90)
|
||||
forward(100)
|
||||
right(90)
|
||||
forward(215)
|
||||
right(180)
|
||||
"all above after large book, and turned around"
|
||||
rectangle(20,100)
|
||||
"above is bottom decoration on large book"
|
||||
forward(150)
|
||||
right(90)
|
||||
forward(75)
|
||||
right(90)
|
||||
"below standard book"
|
||||
forward(150)
|
||||
right(180)
|
||||
forward(150)
|
||||
right(90)
|
||||
forward(76)
|
||||
right(90)
|
||||
forward(150)
|
||||
right(180)
|
||||
forward(200)
|
||||
right(90)
|
||||
forward(76)
|
||||
right(90)
|
||||
forward(200)
|
||||
right(90)
|
||||
forward(500)
|
||||
"below starts the wooden shelf below"
|
||||
left(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(600)
|
||||
left(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(100)
|
Loading…
Reference in New Issue