Hong-Phuc Bui
2024-09-27 45c96fe258657363ef4ad1a2ae93513ca4139e26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import turtle as t
 
alpha = 12
beta = 2*alpha
gamma = 180 - beta
 
steps = 100
petals = 5
 
init_angle = 5
 
for i in range(0, petals):
    start_angle = init_angle + (i * 360 / petals)
    t.setheading(start_angle)
    t.left(alpha)
    t.fd(steps)
    t.right(beta)
    t.fd(steps)
    t.right(gamma)
    t.fd(steps)
    t.right(beta)
    t.fd(steps)
 
t.done()