Lesson 48 of 51 · Advanced
Generative Art
Combine randomness + math + colors to create unique art.
Python
from turtle import *
import random, math
bgcolor("black")
speed(0)
tracer(100)
hideturtle()
colormode(255)
for i in range(300):
r = random.randint(0, 255)
g = random.randint(0, 255)
b = random.randint(0, 255)
color(r, g, b)
penup()
goto(random.randint(-250, 250), random.randint(-250, 250))
pendown()
circle(random.randint(5, 30))
update()
done()Output

1
The Recipe
Random positions + random sizes + random colors = endless variety.