@masonjargon/

Turtle Hypnotic Pattern

Python (with Turtle)

No description

fork
loading
main.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
x = (1,2,3)

import turtle
print(dir(turtle))



from turtle import *
import random
colors = ('blue', 'gold', 'brown', 'green', 'orange')

# Pattern
T = []
N = 3

#t = turtle.Turtle()
speed(0)
color(random.choice(colors))
setposition(3*7, 3*7)
left(3*90/N)
shape('turtle')

length = 5
while length < 500:
  forward(length)
  left(90)
  length += 10
  
result
console