Back to Movie Clips

👻 Henry’s Pythonic Ghost

A novice coder, Python 3, the Python Processing IDE — and a little AI magic.

About This Animation — Henry’s Story
✨ Novice Creation

Henry is a beginning programmer who used Python 3 inside the Python Processing IDE to create the interactive ghost animation you see here. He came to the project with a basic knowledge of Python — variables, functions, loops, and dictionaries — and partnered with an AI agent to bring his vision to life.

The result is genuinely impressive for a first sketch: each ghost floats with a sinusoidal bob, has eyes that track the mouse cursor, a wavy hem that ripples each frame, and a randomized blinking system. Ghosts can be clicked to select them, then moved around the canvas with the WASD keys. Clicking empty space spawns a new ghost. A twinkling star field provides the spooky atmosphere.

This is Python Processing — the same creative coding environment as p5.js, but written entirely in Python. Henry wrote his sketch in a file called henryGhost.py and ran it directly in the Python Processing IDE, with no HTML, no JavaScript, and no browser involved.

The bigger picture: Henry’s ghost is the seed of a development saga. See the “What’s Next” section below for where this project is headed.


Video is only available in larger viewports.
On some mobile devices, rotating to landscape will allow viewing.

Recorded 2026-09-22  •  Python Processing IDE  •  Henry

Henry’s Source Code — henryGhost.py

The complete Python 3 sketch as written in the Python Processing IDE. Copy it into your own Python Processing environment and run it — it works as-is.

    Python 3 · Python Processing IDE · ~270 lines · By Henry
    How to run this sketch: Click Copy above, open the Python Processing IDE, paste the code into a new sketch, and press Run. No imports or additional setup needed — Processing’s drawing functions (size(), draw(), fill(), etc.) are available automatically in the Python Processing environment.

    The Ghost Saga — Where It Stands

    Henry’s sketch grew into a multi-stage Creative Cross Training project at TNT. The recording on this page shows Stage 0 — the original Python Processing design exactly as Henry wrote it. Here is how the saga has evolved since:

    • Stage 0 (This page): Original Python Processing sketch — procedural, dictionary-based, interactive. The video above.
    • Stage 1 (Complete): Full p5.js port + Java Processing port + three-language cross-training comparison. Ghost Wrangler runs live in the browser.
    • Stage 2 (Complete): Twinkling Stars backdrop extracted and redesigned — named constants replace magic numbers, HSB color mode replaces raw RGB, sinusoidal phase offsets give every star independent twinkling. Documented across all three languages.
    • Stage 3 (In Queue): Full Ghost Rebuild — OOP structure, constants for every magic number, improved star backdrop wired back in. Quality code a student can read, understand, and extend.
    • Stages 4–5 (Future): PyWave and SketchWave library upgrades — the raw Processing math becomes named, encapsulated library calls. The before/after comparison is the payoff for everything built in Stages 1–3.

    The saga has its own home page, a live p5.js showcase, a three-language comparison, and a full S.P.A.R.K. development chat log:

    Ghost Saga Home  •  Ghost Wrangler (p5.js)  •  Cross Training (3 Languages)  •  Dev Chat Log