| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A few small generative-art toys written in mostly pure Python — standard library only, apart from one optional GIF exporter. Throwaway weekend code that turned out kind of pretty.
An animated ASCII aquarium that runs right in your terminal. Fish made of ><(((°> swim left and right, wrap around the edges and flip direction, randomly drift up and down, and change colour each lap. Bubbles spawn at the bottom and wobble their way up to the surface. The top is a ~~~ waterline, the bottom sands itself in with scattered ./_ grains.
Everything scales to your terminal size — a wider window gets more fish.
python3 aquarium.py # Ctrl-C to quitHow it works
Draws curving "ink" lines by releasing ~1400 particles into an invisible flow field and letting them ride the currents. Every run is unique: the noise field, the seed, and the colour palette are all randomised. Output is a single self-contained SVG (vector, infinitely zoomable).
python3 flowfield.py # writes flowfield.svg, prints the seedHow it works
Tweakables (top of the file): N_PARTICLES, STEPS, STEP_LEN, GRID (field frequency), canvas W/H, and MARGIN.
Craig Reynolds' classic boids: each bird steers by just three local rules — separation (don't crowd neighbours), alignment (match their heading), cohesion (drift toward their centre) — and a swarm emerges with no leader and no global plan. A minimum-speed rule keeps every bird cruising so the flock never collapses into a stationary clump.
python3 boids.py # -> boids.svg : one still, trails = the swarm's path
python3 boids.py --gif # -> boids.gif : animation (needs Pillow)How it works
Tweakables (top of the file): N_BOIDS, PERCEPTION, SEPARATION, MAX_SPEED/MIN_SPEED, MAX_FORCE, TRAIL.
A digital harmonograph — the Victorian contraption where a pen tied to two or three swinging, slowly-dying pendulums draws hypnotic looping figures. The pen position is just a sum of decaying sine waves; because the pendulums are detuned a hair off whole-number ratios, the figure precesses instead of closing, and the damping makes it spiral gently inward as the swing dies.
python3 harmonograph.py # -> harmonograph.svg : one still (no deps)
python3 harmonograph.py --gif # -> harmonograph.gif : pen draws live (Pillow)
python3 harmonograph.py --seed 7 # reproduce a specific figureHow it works
Tweakables (top of the file): DURATION, DT (curve smoothness / file size), BASE_FREQ, DETUNE, LINE_W.
Not generative art — a live-data toy. Fetches the International Space Station's current position from the open-notify.org API and plots it as a bright @ on an ASCII world map in your terminal. It also prints the crew list the API returns — but that particular feed is known to be stale (it has served the same old snapshot for a long time), so the script labels it as such. The @ position, however, is genuinely live.
python3 iss.py # one snapshot
python3 iss.py --track # live: re-fetches every 5s, Ctrl-C to quitNeeds internet, but no API key and no third-party libraries — just urllib from the standard library.
How it works
Another live-data toy, but this one makes music. It pulls the last 24 hours of earthquakes from the USGS real-time feed and sonifies them into a ~80-second stereo WAV, plus an SVG poster showing where every note came from.
The mapping: time of quake → position in the piece, magnitude → loudness and how long the bell rings, depth → pitch (shallow quakes chime high, 600 km deep-focus quakes toll low), longitude → stereo pan. Pitches snap to an A-minor pentatonic scale, so whatever the planet did today comes out vaguely musical. Every day is a different piece.
python3 quakesong.py # fetch + write quakesong.wav / .svg
python3 quakesong.py --min-mag 4.5 # only the big ones
python3 quakesong.py --seconds 120 # stretch the day over 2 minutesHow it works
There's also quakesong.html — a self-contained interactive player. Open it straight from disk in any browser (no server needed): it fetches the live USGS feed on load (the feed is CORS-open, so this works even from file://), falls back to an embedded snapshot when offline, and plays today's quakes with the same bell synth rebuilt in WebAudio. Ripples burst on a world map in sync with the sound, the score strip is click-to-seek, and the ↓ WAV button renders the whole piece offline (OfflineAudioContext) and downloads it — so the generated WAV isn't checked into the repo, you always make a fresh one.
A complete Wordle clone in one static HTML file — no server, no build, no network at all. Double-click it and play. The full dictionary (2,315 answers + ~12,500 extra valid guesses, the original Wordle lists) is embedded right in the file, so it works on a plane.
Same idea as Wordle, but the hidden word is a 5-swara tune and the letters are Sa Re Ga Ma Pa Dha Ni. Listen to the melody, tap it back on the pads, get green / amber / grey feedback per beat. Six tries. One static file, WebAudio synth, no server.
Beginner-friendly on purpose:
Daily tune seeded from the UTC date (same for everyone, per raag), plus unlimited practice tunes. Keys 1–7 play the pads, Enter submits.
Five sample renders from flowfield.py, each as both PNG (preview) and SVG (source). They show the range of palettes the script produces — same code, different seed.
![]() |
![]() |
![]() |
![]() |
![]() |
Python 3.6+ and nothing else — except the --gif modes of boids.py and harmonograph.py, which need Pillow (pip install pillow). Everything else, including every SVG mode, is pure standard library.
| Back | FazBrowse Home | New Git URL |