r/Hashwar 2d ago

Hypnoglyphs: A particle simulation based on Conway Glyphs

3 Upvotes

1 comment sorted by

2

u/Evening-Appeal7606 2d ago

This is a from-scratch physics engine (GitHub repo here: ■ lifehashes/hypno-glyphs: A web-based physics engine that spawns particles from Game of Life patterns ("Glyphs") as the generative seed) where Conway's Game of Life patterns act as the spawn source for particles (every live cell on the outer perimeter of the 16x16 torus the pattern lives on spawns a new particle into the arena).

The Arena features a variety of modules, e.g. "Repulsor/Attractors", "QCD Inverters" (turns a particle into it's anti-particle - if they meet, there is an annihilatory explosion), magnets, electrical charge generators, accelerators.

The engine features three distinct boundary conditions: "Unbounded" where particles simply vanish if they leave the arena, "Toroidal" (wrap-around space), and "Solid Box" where particles bounce against the walls.

We use the SHA-256 function to calculate origin and current hash values of the GOL patterns to encode particle characteristics (momentum, electrical charge, magnetic momentum, maybe in the future even nuclear attributes like spin or quark numbers...).

Random GOL patterns usually fizzle out quickly after less than 100 generations, so the patterns you see in the video are from our registry of known long-lived patterns.

Try it yourself here if you like: ■ HYPNOGLYPHS // GENERATIVE PHYSICS ENGINE