-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign_code.py
58 lines (55 loc) · 994 Bytes
/
design_code.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
57
58
# from turtle import *
# import colorsys
# speed(0)
# hideturtle()
# bgcolor('white')
# tracer(5)
# width(2)
# h=0.001
# for i in range(90):
# color(colorsys.hsv_to_rgb(h,1,1))
# forward(100)
# left(60)
# forward(100)
# right(120)
# circle(50)
# left(240)
# forward(100)
# left(60)
# forward(100)
# h+=0.02
# color(colorsys.hsv_to_rgb(h,1,1))
# forward(100)
# right(60)
# forward(100)
# left(120)
# circle(-50)
# right(240)
# forward(100)
# right(60)
# forward(100)
# left(2)
# h+=0.02
# done()
#===============================================
import turtle
import colorsys
t=turtle.Turtle()
turtle.Screen().bgcolor('black')
t.pensize(2)
t.speed(9)
n=36
h=0
t.goto(-60,0)
for i in range(20):
c=colorsys.hsv_to_rgb(h,1,1)
h+=1/n
t.pencolor(c)
t.circle(105,103)
t.backward(98)
t.right(60)
t.circle(70,68)
t.left(87)
t.backward(108)
t.forward(150)
turtle.done()