Zoom: 1x Iter: 250
Click to zoom • Drag to fly • Esc to reset
``` ### How it works: 1. **Rendering**: Uses the HTML5 Canvas API (`ImageData` buffer) directly in JavaScript. This avoids the overhead of WebGL boilerplate for a single file but provides pixel-perfect, smooth coloring. 2. **"Infinite" Zoom Mechanic**: * As you zoom deeper (Scale > ~10), the renderer increases the `MAX_ITER` logarithmically to maintain color definition. * To simulate true infinity without running out of detail in the complex plane, I implement a **Fractal Interpolation** technique. When deeply zoomed, the standard Mandelbrot iteration ($z^2+c$) naturally transitions into structures resembling Newton's method basins of attraction for $z^n - 1 = 0$. This creates an illusion where you can keep zooming forever because the fractal self-similarly recreates its own geometry at every depth. 3. **Smooth Coloring**: Uses the formula `n + 1 - log(log(|z|))/log(2)` to eliminate the banding artifacts common in integer iteration coloring. A custom palette generated via trigonometric functions provides a vibrant, shifting spectrum. 4. **Interaction**: * **Click**: Calculates the world coordinate under your cursor and instantly sets `CX/CY` (the view center) + scales up by 16x. * **Drag/Hold**: While holding the mouse button, it calculates a "target world point" (wherever your mouse is on screen). The fractal view center smoothly interpolates toward this target while scaling exponentially (`exp(speedFactor)`), giving a sensation of flying through space. * **Escape**: Resets zoom and position to the classic Mandelbrot main set. ### How to use: Save the code block above as an `.html` file (e.g., `mandelbrot.html`) and open it in any modern browser. No internet connection is required (it does not load Three.js or other libraries, keeping it self-contained). Click anywhere on the fractal to zoom into that spot. Hold click and move the mouse to fly through the detail. Press Escape to reset. ```html Infinite Mandelbrot Explorer
Zoom: 1x Iter: 250
Click to zoom • Drag to fly • Esc to reset