generated from mwc/project_drawing
This segment of the project I spent decorating the
books on the shelf itself. This process took a lot of tries before I setteled on this configuration of shapes and decorations. Initially, I had different decoraions, and they were not utlizing the defined variables that I created in a way that I liked. I also took a lot of time to think about what this process might be like if I was a student. I really appreciated what you said in your video about writing code like writing a story. There are spaces to plan, but also spaces to create. So, I looked back and decided that what I created needed to be honed and fine tuned, almost like a draft when you write creatively. Although the decorations made sense, they were messy and confusing when you looked at them as a whole. So, I stepped back and went back to my plan. There is one section of code that I have been playing with to try and incorporate iteration. On one book there is a hexagon that consists of multiple triangles. The code looks as follows. book_decal_triangle(10) right(60) book_decal_triangle(10) right(60) book_decal_triangle(10) right(60) book_decal_triangle(10) right(60) book_decal_triangle(10) right(60) book_decal_triangle(10) penup() I have been trying to make this into an iteration, but it is really tricky! Having the book_decal_triangle predefined is a lot of layers of coding and I have yet to find a way to layer them with the result I want. This trial and error is something I am trying to contextualize in the framework of a student as well. I really enjoyed recognizing the need for simplification, and knowing that there is a way to accomplish it. Even though it is tough and I havne't figured it out, it feels like a genuine win to recognizes those needs. Like I said in one of my previous commit messages, this process has been a big challenge for me to learn. My brain is so used to contextualizing literature, that learning this new kind of literacy has been a tremendous challenge. Every success throughout this project has been a really meaningful win.
This commit is contained in:
parent
56996424d5
commit
f05941da11
145
drawing.py
145
drawing.py
|
@ -15,6 +15,34 @@ def rectangle(width,height):
|
|||
left(90)
|
||||
forward(height)
|
||||
left(90)
|
||||
|
||||
def book_decal_triangle(side_length):
|
||||
forward(side_length)
|
||||
right(120)
|
||||
forward(side_length)
|
||||
right(120)
|
||||
forward(side_length)
|
||||
right(120)
|
||||
|
||||
def book_decal_rectangle(height,width):
|
||||
for _ in range(2):
|
||||
forward(width)
|
||||
left(90)
|
||||
forward(height)
|
||||
left(90)
|
||||
|
||||
def half_arc_left(radius):
|
||||
circle(radius, 180)
|
||||
|
||||
def half_arc_right(radius):
|
||||
circle(-radius, 180)
|
||||
|
||||
def square(side_length):
|
||||
for _ in range(4):
|
||||
forward(side_length)
|
||||
right(90)
|
||||
|
||||
|
||||
rectangle(20,100)
|
||||
left(180)
|
||||
forward(20)
|
||||
|
@ -64,4 +92,119 @@ forward(600)
|
|||
left(90)
|
||||
forward(50)
|
||||
left(90)
|
||||
forward(100)
|
||||
forward(100)
|
||||
|
||||
forward(45)
|
||||
penup()
|
||||
right(90)
|
||||
forward(70)
|
||||
pendown()
|
||||
book_decal_triangle(20)
|
||||
penup()
|
||||
forward(30)
|
||||
pendown()
|
||||
book_decal_triangle(20)
|
||||
penup()
|
||||
forward(30)
|
||||
pendown()
|
||||
book_decal_triangle(20)
|
||||
penup()
|
||||
forward(30)
|
||||
pendown()
|
||||
book_decal_triangle(20)
|
||||
"Above is final book decorations"
|
||||
left(90)
|
||||
penup()
|
||||
forward(90)
|
||||
left(90)
|
||||
forward(60)
|
||||
pendown()
|
||||
book_decal_rectangle(20,55)
|
||||
left(90)
|
||||
penup()
|
||||
forward(20)
|
||||
pendown()
|
||||
right(90)
|
||||
book_decal_rectangle(20,55)
|
||||
"Above are matching rectangles on book 6"
|
||||
penup()
|
||||
forward(65)
|
||||
right(90)
|
||||
forward(75)
|
||||
pendown()
|
||||
book_decal_triangle(10)
|
||||
right(60)
|
||||
book_decal_triangle(10)
|
||||
right(60)
|
||||
book_decal_triangle(10)
|
||||
right(60)
|
||||
book_decal_triangle(10)
|
||||
right(60)
|
||||
book_decal_triangle(10)
|
||||
right(60)
|
||||
book_decal_triangle(10)
|
||||
penup()
|
||||
forward(60)
|
||||
right(60)
|
||||
"Above is design on book 5"
|
||||
forward(60)
|
||||
right(90)
|
||||
forward(100)
|
||||
pendown()
|
||||
book_decal_rectangle(10,110)
|
||||
left(90)
|
||||
penup()
|
||||
forward(65)
|
||||
pendown()
|
||||
|
||||
circle(10)
|
||||
right(90)
|
||||
penup()
|
||||
right(180)
|
||||
forward(110)
|
||||
pendown()
|
||||
|
||||
circle(10)
|
||||
right(90)
|
||||
penup()
|
||||
forward(5)
|
||||
right(90)
|
||||
forward(8)
|
||||
left(90)
|
||||
pendown()
|
||||
|
||||
"Below creates wood eye"
|
||||
half_arc_left(13)
|
||||
penup()
|
||||
forward(30)
|
||||
pendown()
|
||||
half_arc_left(13)
|
||||
penup()
|
||||
forward(45)
|
||||
pendown()
|
||||
half_arc_left(15)
|
||||
penup()
|
||||
forward(55)
|
||||
pendown()
|
||||
half_arc_left(15)
|
||||
|
||||
penup()
|
||||
forward(70)
|
||||
pendown()
|
||||
forward(60)
|
||||
|
||||
penup()
|
||||
right(180)
|
||||
forward(150)
|
||||
pendown()
|
||||
forward(100)
|
||||
right(90)
|
||||
|
||||
penup()
|
||||
forward(15)
|
||||
left(90)
|
||||
pendown()
|
||||
forward(200)
|
||||
|
||||
|
||||
input()
|
Loading…
Reference in New Issue