Source

PyCessing / pycessing / data / examples / lists-particles.cess

# Drawing on a coordinate list
import random

coords = [ (20, 20),
           (50, 50),
           (80, 90),
           (123, 231),
           (100, 100) ]
           
for x in range(100):
    newcoord = (random.randint(1,300), random.randint(1, 200))
    coords.append(newcoord)
           
def setup():
    pycessing.noLoop = True
    
def draw():
    for coordinate in coords:
        circle( coordinate[0], coordinate[1], 5 )