This is a 2D software-rasteriser companion to the 3D Neon Tunnel scene elsewhere on the site — instead of a GPU fragment shader running once per screen pixel in parallel, this page walks every pixel of a small offscreen buffer in plain JavaScript, computes its colour with the same kind of polar-coordinate maths, and writes it straight into an ImageData array. There is no camera, no projection matrix, and no perspective divide anywhere — it is a direct coordinate remapping, not a simulated lens.
Each pixel's screen position is converted to polar form (angle, radius r from the centre). Instead of the inverse-radius 1/r used by the shader original, this build uses a logarithmic depth coordinate t = -ln(r) + time·speed — mathematically a different family of conformal map (a log-polar transform), so equal steps in on-screen radius correspond to equal ratios of depth rather than equal reciprocal distances, giving the tunnel a slightly different, more evenly-paced recession than the shader version.
- Domain warp — the polar angle used to draw the neon wall is perturbed by fractal value noise,
a' = a + warp · fbm(a·scale, t·0.3), so the wall pattern bows and buckles instead of staying perfectly straight — a technique called domain warping, computed here with a hand-written hash-based value-noise function (no library), summed over three octaves.
- Fractal Brownian motion (fbm) — three octaves of value noise at doubling frequency and halving amplitude are summed to build organic, multi-scale wall texture from a single deterministic hash function.
- Raster detail — because every pixel runs real trig and noise evaluations in JavaScript (no GPU), the buffer is rendered at a reduced resolution and the browser's own bilinear image scaling stretches it to full size — exactly the classic "render small, upscale" trick used by CPU-bound demoscene effects.