Skip to content

RMANOV/algorithmic-arts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Algorithmic Arts

Mathematical animations in pure Python — zero dependencies, one file, stdlib only.

No pygame. No numpy. No shaders. Just tkinter, math, and ideas that are older than computers: fiber bundles, chaotic attractors, hyperbolic geometry, n-body gravity. If you have Python, you already have everything this needs.

python spectral_geometry.py            # windowed art / ambient display
python spectral_geometry.py --selftest # headless render test, no screen needed

Controls: Space / / mouse click — next scene · — previous · Esc / Q — quit. Scenes auto-rotate every 7 minutes. Live clock + optional system telemetry (CPU/RAM, if psutil is present) make it a pleasant second-monitor ambient panel.


Gallery

Hopf Fibration Hopf Fibration — the circles of S³ stereographically projected to 3D: nested tori breathing as the base sphere rotates. The crown jewel of the collection. Three-Body Ballet Three-Body Ballet — the Chenciner–Montgomery figure-8 choreography: three equal masses under real gravity (velocity-Verlet), weaving one shared orbit from nothing.
Hyperbolic Flow Hyperbolic Flow — a geodesic web in the Poincaré disk carried by a live Möbius transformation. Escher's Circle Limit, but flowing. Clifford Attractor Clifford Attractor — a strange attractor whose four parameters breathe sinusoidally: the form perpetually reborn.
Chaos Butterflies Chaos Butterflies — 36 double pendulums differing by 10⁻⁵ radians: a minute of unison, then sensitive dependence tears them apart. The theorem, drawn. Klein Bottle Klein Bottle — a rotating non-orientable surface (bagel immersion) with a breathing scale.
Torus Knot Morph Torus Knot Morph — (2,3) → (3,4) → (2,5)… knots smoothstep-morphing into one another. Murmuration Wars Murmuration Wars — three boid flocks locked in rock-paper-scissors predation; a caught bird converts to the hunter's colour in a burst ring.

Why stdlib-only?

Because constraints are the art. Every scene here is:

  • One file, no installs — runs on any Python ≥ 3.10 with tkinter (the default on Windows/macOS, one package away on Linux)
  • A pooled-canvas renderer — pre-allocated line items, style caching, quantized HSV: thousands of segments at 30 fps on an office laptop
  • Honest mathematics — real Verlet gravity, real RK4 pendulums, real Möbius maps and stereographic projections; nothing is a pre-baked path

Repository layout

spectral_geometry.py     # the current piece: 8 scenes, windowed, selftest
series/                  # the evolution: 01→09, fullscreen tkinter experiments
assets/                  # GIF/poster previews + the headless renderer that made them

The series/ folder is the archaeology — nine earlier screensavers (sacred geometry, 4D polytopes, walking creatures, wireframe terrain…) that led here. assets/render_previews.py re-renders every preview headlessly (Pillow used only for asset generation, never at runtime).

License

MIT — take it, remix it, put it on the second monitor of your open-space office.

About

Mathematical animations in pure Python — Hopf fibration, three-body choreography, hyperbolic flows, strange attractors. Zero dependencies, stdlib only.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages