Skip to content

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()
Change the colour: Open this sketch in Play ›

Made with funground

All the examples ›

Three things you can do today

Each one is a short chapter in the guide.

A star drawn with a path

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 ›
Squares turning from blue to pink

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 ›
The raga explorer, showing Yaman

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.

The guide

  1. Getting started
  2. The sketch
  3. Shapes
  4. Colour
  5. Fill, stroke and lines
  6. Text
  7. Animation and time
  8. Transforms
  9. Paths, clipping and pictures
  10. Interaction
  11. Randomness and noise
  12. Useful maths
  13. Saving your work
  14. Coming from p5.js and Processing
  15. Coming from DrawBot
  16. Sound
  17. Ragas and talas
  18. Projects
  19. Studios

Three ways to run it

In your browser

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 ›
On GitHub, in your browser

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 ›
On your own computer

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 ›
A course

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 ›
For teachers

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 ›