Draw, animate and make sound with Python.
Write a few lines, press Run, and the visual you designed appears. Installation is optional.
In the spirit of Processing, p5.js and DrawBot · Runs in the browser · On Windows: try it now · Mac and Linux: coming soon · Free and open source · Coded mostly by AI under human guidance
import funground as ff.size(640, 400)f.background("midnightblue")f.fill("tomato")f.circle(320, 200, 120)f.show()
Made with funground
All the examples ›Three things you can do today
Each one is a short chapter in the guide.
Draw
Shapes, colour, text and paths. Every picture is a few lines you can read.
f.fill("gold")f.square(80, 80, 160)f.fill("hotpink")f.circle(400, 200, 140)Chapter 3: Shapes ›
Animate
A draw() function runs sixty times a second. Change a number each time and things move.
def draw(): f.background("oldlace") f.translate(320, 200) f.rotate(f.frame_count * 2) f.square(-60, -60, 120)Chapter 7: Animation and time ›
Make sound
Tunes from text, a tabla theka, and thirteen Hindustani ragas with their aroha and pakad built in.
yaman = f.raga("Yaman")f.melody(yaman.aroha, sa="D4").play()f.tala("Teentaal", tempo=100).loop()Chapter 17: Ragas and talas ›
Where funground comes from
It borrows from the tools that came before it, and tries to remove what kept a learner out of each.
Processing and p5.js
The sketch: setup() runs once, draw() runs sixty times a second, and the picture moves. p5.js runs in any browser with nothing to install.
- Kept
- The sketch, and running in the browser.
- Changed
- You write Python, not JavaScript or Java.
DrawBot
The script: a Python file that makes a poster, a PDF with real text, or a booklet of pages. It runs on a Mac only.
- Kept
- Scripts, PDF and SVG with real text, pages.
- Changed
- It runs on Windows, Mac and Linux, and in the browser.
How it is built
Cairo draws the picture and pygame-ce opens the window. In the browser, the same Python runs through Pyodide. Free software under the LGPL-2.1, the licence family of p5.js, Processing and pygame-ce. The examples are CC0.
The full comparison, checked against each tool's own documentation ›The guide
Three ways to run it
Play
Open Play, pick an example or start blank, and press Run. Nothing to install: Python loads into the page the first time. Share a sketch as a link.
Open Play ›Your own sketchbook
Make a copy of the funground sketchbook and open it in github.dev, the VS Code editor in the browser, with the funground extension. Your sketches are saved in your own repository.
The sketchbook ›Install with pip
On Windows, try it now; on Mac and Linux it is coming soon. You need Python 3.11 or newer.
python -m pip install funground
Chapter 1 shows the steps ›
Creative practice with funground
Learn to see, choose and make with code. The lessons go from a single circle in a frame to colour, type, covers and posters, motion and generative work, and end with a small visual world of your own. Each one has runnable code, experiments, an assignment and questions for review.
Start the course ›Made for learning and teaching
funground was made to make learning and teaching Python engaging: a few lines draw a picture, play a tune or move on screen, so every lesson has something to look at and talk about.
- The guide: short chapters, each building on the last, with projects and a chapter on running a group session.
- The course: lessons in looking and making, with assignments.
- The examples are original and CC0: copy them into your own materials freely.
Teaching with funground? Tell us what works and what is missing, share a lesson, or help shape what comes next: join the discussions ›



