Skip to content

iamthebrainman/THE-WORD---Geometric-Hash-Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

THE WORD // Hash Geometry Visualizer ⬡

"Every word has a geometric address that exists before any corpus is loaded. Language is geometry."

THE WORD is a standalone, browser-based visualizer designed to explore how different string-hashing algorithms distribute language across a 16-bit geometric address space (65,536 slots). By parsing plain text into custom deterministic tokens and processing them through mathematical ratios (like $\phi$, $\tau$, and the Fibonacci sequence), this tool reveals the hidden collisions, interference patterns, and structural resonances of text corporas.

Screenshot 2026-04-09 002929

✨ Features

  • Zero Dependencies: 100% vanilla HTML, CSS, and JS. Runs entirely locally in your browser.
  • Drag-and-Drop Parsing: Drop any text or source code file (.txt, .md, .rs, .py, etc.) into the corpus zone to instantly hash its vocabulary.
  • Real-Time Animation Transport: Scrub, play, and adjust sweep speed to visualize structural alignment ("snap points") as geometric variables shift.
  • Live Frame Statistics: Computes occupancy, hash collisions, maximum token density, Shannon entropy, and $\phi$-resonance in real time.
  • Dynamic Render Controls: Adjust point sizes, bloom/glow strengths, color palettes (Plasma, Inferno, Matrix, etc.), and mathematical bounds on the fly.
  • One-Click Export: Easily save high-resolution PNG snapshots of any generated interference pattern.

👁️ Visualization Views

  1. Coil Unwind (Archimedean Spiral): Maps the hash space into a coil. The "pitch" dynamically unwinds the spiral. As patterns overlap at tight pitches or separate into arms, you can spot geometric reinforcements and cancellations.
  2. Sunflower Spiral (Golden Angle): Uses the Golden Angle ($\approx 137.5^\circ$) to plot addresses naturally. Perfect for visualizing organic clumping and distribution efficiency.
  3. XY Grid Sweep: Unrolls the 1D address space into a 2D matrix, sweeping the line-width parameter to look for rhythmic padding and modulo-based repetition structures.
  4. All Methods: A unified dashboard comparing the Sunflower projections of all 10 hashing methods side-by-side.

🧮 Embedded Hash Methods

The visualizer implements 10 unique, byte-level processing methods built on top of a custom "Carousel Encoder" (which compresses characters into 5-bit integers):

  1. Original: Interleaved multiplication and division carousel.
  2. Phi Ratio: Preserves the golden ratio ($\phi \approx 1.618$) iteratively.
  3. Geometric Mean: A $\phi$-anchored square root aggregator.
  4. Fib Index: Nearest-neighbor search within a precomputed Fibonacci lookup table.
  5. Phi Knuth: Multiplicative hashing utilizing Knuth’s 32-bit golden integer (2654435769).
  6. $\pi$ / $\phi$ Cross-Resonance: Cosine projections mapped across phase space.
  7. Silver Ratio: Driven by $1 + \sqrt{2} \approx 2.414$.
  8. Tribonacci: Driven by the tribonacci constant $\approx 1.839$.
  9. Golden Spiral: Simple continuous angular rotation based on the golden angle.
  10. Tau Circle: $2\pi$ driven periodic phase wrapping.

🚀 Getting Started

There is no build step or installation required.

  1. Clone or download the repository.
  2. Open GeometricHashVisualizer.html in any modern web browser.
  3. Drag and drop a text file onto the left-hand panel.
  4. Hit Play and watch the coil unwind.

⌨️ Keyboard Shortcuts

Key Action
Space Play / Pause
Left Arrow Previous Frame
Right Arrow Next Frame
Up Arrow Increase Playback Speed
Down Arrow Decrease Playback Speed
0 - 9 Quick-switch between the 10 hashing methods

🧠 What's Happening Under the Hood?

  1. Tokenization: The input text is cleaned (lowercase, alphanumeric) and split into distinct word strings.
  2. Carousel Encoder: Characters are compressed into bitwise seeds.
  3. Hashing: Every distinct word generates a deterministic float or integer sequence via the selected method, mapping the result to a strict 0 - 65,535 slot address.
  4. Counting: Frequencies are aggregated into a typed Uint16Array.
  5. Rendering: The index/slot is transformed into physical X/Y canvas coordinates via polar/geometric conversion formulas. Frequency governs the color intensity/palette mapping of each pixel.

License

MIT License. See LICENSE for more information.

About

A Visualizer for language processed with Geometric Deterministic Addressing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages