👻 Henry’s Pythonic Ghost
A novice coder, Python 3, the Python Processing IDE — and a little AI magic.
About This Animation — Henry’s Story
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.
size(), draw(), fill(), etc.)
are available automatically in the Python Processing environment.
What’s Next — The Ghost Saga
Henry’s ghost is the starting point for an ongoing development saga. The plan is to take this basic working sketch through a series of planned improvements that mirror how professional software evolves — and teach powerful CS concepts along the way:
- Stage 1 (Complete): Working Python Processing sketch — procedural, dictionary-based, interactive.
- Stage 2: Introduce a
Ghostclass in Python Processing. Replace the dictionaries with a proper object that has attributes and methods. This is the OOP upgrade. - Stage 3: Port the sketch to JavaScript + p5.js. The same ghost, the same behavior — but now running in a browser, in JavaScript, using a
Ghostclass. - Stage 4: Leverage the PyWaveTNT library — use
PWColorandPWSinusoidclasses to upgrade the color handling and the sinusoidal floating animation, replacing the raw HSB values and manual math with library calls. - Stage 5: Apply the SketchWave JS library to the p5.js version the same way —
SWColor,SWSinusoid— and compare the two parallel implementations side by side as a TNT Cross Training concept page.
This project will be chronicled in a S.P.A.R.K. Chat Log as the saga progresses.