generated from mwc/project_drawing
What got me stuck in the beginning is figuring out where to begin. It was an easy fix because I used the previous assignments to help me with making shapes using various parameters. I figured out that the previous lessons still prove to be a great help to look back at when stuck. I was specifically stuck with the animation of the sun rising. A different method was used to create a rising sun but was outside of the realm of super turtle which ultimately had me back track. It took longer to try and learn animation with super turtle so I reached out to my professor and decided I will continue with my house but the sun will be stationary rather than rising. Something I want to learn more about is animating using super turtle. An idea for a future project will be to create a house and a rising sun using the tools of super turtle.
41 lines
882 B
Python
41 lines
882 B
Python
import turtle
|
|
|
|
def draw_square(t, size, color="black", fill=""):
|
|
t.color(color, fill)
|
|
if fill:
|
|
t.begin_fill()
|
|
for _ in range(4):
|
|
t.forward(size)
|
|
t.right(90)
|
|
if fill:
|
|
t.end_fill()
|
|
|
|
def draw_rectangle(t, width, height, color="black", fill=""):
|
|
t.color(color, fill)
|
|
if fill:
|
|
t.begin_fill()
|
|
for _ in range(2):
|
|
t.forward(width)
|
|
t.right(90)
|
|
t.forward(height)
|
|
t.right(90)
|
|
if fill:
|
|
t.end_fill()
|
|
|
|
def draw_triangle(t, size, color="black", fill=""):
|
|
t.color(color, fill)
|
|
if fill:
|
|
t.begin_fill()
|
|
for _ in range(3):
|
|
t.forward(size)
|
|
t.left(120)
|
|
if fill:
|
|
t.end_fill()
|
|
|
|
def draw_circle(t, radius, color="black", fill=""):
|
|
t.color(color, fill)
|
|
if fill:
|
|
t.begin_fill()
|
|
t.circle(radius)
|
|
if fill:
|
|
t.end_fill() |