Assignment 1: Turtle Design
Description
Did you know you can produce art without ever touching a paintbrush or digital art application? Did you know that art can be created from math?
Task
Draw a design using the Python turtle. Be creative! If you need inspiration, search Fractals or Tessellations. As part of the program, you must demonstrate the following:
Create functions for your basic design. You'll impress me if you create functions that incorporate existing functions you've created. Functions must demonstrate the passing of parameters (arguments).
Functions must be in a separate file that you import into your main file.
Demonstrate the use of loops to call your function. Depending on your design, you will probably also have loops in your functions. The two are not the same.
Incorporate colors into your design. Feel free to use any combination of rgb colors, standard colors, and filling in of colors.
Though creative may be a challenge, your design should generally be aesthetically pleasing.
Optional ( Grade Boosters )
Demonstrate the use of random numbers. Random numbers can be used in place of position, colors, dimensions of a design.
Demonstrate the use of the loop variable in conjunction with a call to your design function or a value to a basic turtle command such as forward, left (or right) or pensize.
For this project.
Post a screen shot of the design.
Post a screen shot of the main file and the file with the functions.
Attach both your files using +Add Files
For Easy Uses for Copy and Paste for Code:
from HuangFunctions import *
from random import randint
turtle.bgcolor('black')
benson.speed(0)
benson.ht()
benson.pensize(1.2)
for lol in range(100):
size = randint(1,3)
Circle('white',size)
newX = randint( -800, 800)
newY = randint( -500,500)
Jump(newX, newY)
Jump(250,-170)
for color in ['red','orange','yellow','green','blue','purple']:
benson.pencolor(color)
Star()
benson.pu()
benson.fd(10)
benson.lt(60)
benson.fd(250)
benson.pd()
Jump(-10,20)
for color2 in ['purple','blue','green','yellow','orange','red']:
for lol in range(100):
Jump(-10,20)
benson.pencolor(color2)
benson.circle(lol)
benson.right(50)
for right in [0,30,60,90,120,150]:
benson.lt(right)