Prime Spiral Visualization Engine
The foundational concept draws from the Sacks Spiral—a method of plotting integers on an Archimedean spiral such that prime numbers reveal striking geometric alignment. This project treats that mathematical structure as a canvas for applied research into procedural coordinate systems, animated parameterization, and human-perceptible pattern emergence.
The objective was not merely to render a known mathematical curiosity, but to engineer an interactive system around it—exposing coefficients, rotation offsets, and prime highlighting as live parameters—so that non-trivial visual phenomena become discoverable by the user in real time. This demands both mathematical precision at the rendering layer and disciplined UI architecture at the control layer.
The research directly informs professional work in systems visualization, defensive interface design, and cross-platform native deployment via Tauri/Rust—domains with direct applicability to enterprise tooling and monitoring infrastructure.
01. Mathematical Engine
Each integer is mapped to a polar coordinate pair (r, θ), where the angular position is derived from its index on the spiral and its radial distance from a tunable coefficient. A primality check runs against this index on every render cycle, applying distinct visual treatment—color, size, and glow—to prime-positioned nodes. Animated parameters continuously modulate the coefficient and rotation values, revealing the underlying geometric structure of the prime distribution dynamically.
02. Defensive UI Architecture
The control interface is engineered on a poka-yoke model: every user-facing parameter is bounded, validated, and clamped prior to propagation into the render pipeline. This prevents degenerate states—such as division-by-zero in the coordinate transform or render-frame stalls from out-of-range inputs—without exposing error states to the end user. The system was validated under sustained adversarial use, including rapid input cycling and extended uninterrupted sessions, with zero observed regressions.
03. Cross-Platform Deployment
The Vanilla JS/Tailwind core is wrapped in a Tauri/Rust shell, enabling native binary distribution across macOS, Windows, and Linux from a single codebase. This architecture mirrors the hybrid deployment model used in enterprise desktop tooling—keeping the rendering layer lightweight and web-native while leveraging Rust's memory safety guarantees for the application host. The web build additionally passed all Lighthouse audit categories at 100, confirming optimal asset delivery, accessibility compliance, and runtime performance independent of the native wrapper.
Verified Outcome
The system achieved perfect Lighthouse scores across all audit categories and sustained zero regressions under extended stress testing. Deployed as both a web build and a native cross-platform application.
Live Deployment
spiral.ianrandmckenzie.com →Prior Art & Inspiration
This work was inspired by the research of Rob Sacks on the Sacks Spiral—a continuous variant of the Ulam Spiral that plots integers on an Archimedean spiral to reveal the geometric structure of prime distribution. This project extends that foundation into an interactive, parameterized system optimized for real-time rendering and cross-platform deployment.
IP Note
This entry represents an independent technical benchmark. The coordinate transformation logic, parameterization architecture, and defensive UI patterns developed here are maintained as part of the broader R&D portfolio. Full technical specifications are available upon request.