-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfnl2.py
56 lines (51 loc) · 1.77 KB
/
fnl2.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
import fnl
import random
import turtle
def get_new_color():
return (random.randint(0, 255), random.randint(0, 255), random.randint(0, 255))
com = int(input("Which art do you want to generate? Enter a number between 1 to 8, inclusive: "))
turtle.colormode(255)
if com == 1:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape(3, get_new_color())
fnl.Shape.draw(shape1)
if com == 2:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape(4, get_new_color())
fnl.Shape.draw(shape1)
if com == 3:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape(5, get_new_color())
fnl.Shape.draw(shape1)
if com == 4:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape((random.randint(3, 5)), get_new_color())
fnl.Shape.draw(shape1)
if com == 5:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape(3, get_new_color(), 0.618)
for j in range(3):
fnl.Shape.draw(shape1)
fnl.Shape.repeat(shape1)
if com == 6:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape(4, get_new_color(), 0.618)
for j in range(3):
fnl.Shape.draw(shape1)
fnl.Shape.repeat(shape1)
if com == 7:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape(5, get_new_color(), 0.618)
for j in range(3):
fnl.Shape.draw(shape1)
fnl.Shape.repeat(shape1)
if com == 8:
for i in range(random.randint(20, 30)):
shape1 = fnl.Shape((random.randint(3, 5)), get_new_color(), 0.618)
for j in range(3):
fnl.Shape.draw(shape1)
fnl.Shape.repeat(shape1)
turtle.speed(0)
turtle.bgcolor('black')
turtle.tracer(0)
turtle.done()