Try   HackMD

hackmd.io/@villares/python-creativecoding-tour

Python Creative Coding Walking Tour

& py5 Office Hours

Video conference at: meet.google.com / yaw-edhk-jrc (remove the spaces)

The tools I'm using

A "hello world"

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Module Mode

import py5

def setup():
    py5.size(500, 500)
    
def draw():  # main loop
    py5.fill(py5.random(255),
             py5.random(255),
             py5.random(255))
    d = py5.random(10, 100)
    py5.circle(py5.mouse_x, py5.mouse_y, d)
    
py5.run_sketch()

Imported Mode

def setup():
    size(500, 500)
    
def draw():  # main loop
    fill(random(255), random(255), random(255))
    d = random(10, 100)
    circle(mouse_x, mouse_y, d)

More stuff to check out

Support my work with donations!

More context on py5

py5 is a Python 3 library based on Processing, a project that started in 2001 with Ben Fry and Casey Reas, initially a Java based language and IDE for artists and designers, now an ecossystem of tools maintained by the Processing Foundation, including the very popular p5js.org Javascript library.
py5 allows you to use the powerful graphics infrastructure and vocabulary of Processing with Python, thus intergrating with the modern Python ecossystem of libraries, like numpy, shapely and trimesh.