Fractint WebAssembly
The legendary DOS fractal generator, compiled to WebAssembly and running in your browser.
Getting Started
Fractint WASM loads entirely in the browser — no installation, no plugins. When the page loads, the Mandelbrot set begins calculating immediately.
First Steps
- Wait for the loading bar to complete. The WASM binary (~784 KB) and fractal data files (~380 KB) load once and are cached by the browser.
- Click the canvas to give it keyboard focus. You'll see a thin focus ring appear. All keyboard shortcuts require focus.
- Press PageUp to zoom into an area, or use the Zoom In button in the controls panel on the right.
- Press + or C to start color cycling and watch the fractal come alive.
Loading Time
First load downloads ~1.2 MB of assets. Subsequent visits load from the browser cache and are nearly instant. The loading overlay shows download progress and disappears automatically when the fractal engine is ready.
Color Cycling
Color cycling is one of Fractint's most distinctive features. Instead of recalculating the fractal, it rotates the 256-entry color palette on every frame, producing fluid animation of the existing image at full framerate.
How It Works
Fractint stores each pixel as a palette index (0–255) rather than a direct color. Color cycling shifts every index by one position each frame. The fractal structure stays frozen while the colors flow through it — a technique inherited from DOS VGA hardware palette animation.
In the WASM port, cycling is implemented via the spindac() function called once per animation frame. The speed slider controls how many frames are skipped between palette rotations: higher values rotate faster.
Controls
Controls Panel
| Control | Function |
|---|---|
| Cycle button | Toggle color cycling on/off. Shows "Cycle" when stopped, "Stop" when active. |
| Speed slider | Palette rotation speed. Range 1–10. Value 7 is the default (smooth, medium pace). |
| Direction button | Toggle forward/reverse cycling. Shows "FWD" or "REV". Changes take effect immediately if cycling is active. |
Fractal Types
The fractal type selector in the controls panel lets you switch between different mathematical systems. Each type has its own characteristic structure, coloring behavior, and zoom targets.
Types labeled (FP) use floating-point arithmetic for maximum accuracy at deep zoom levels. Types labeled (int) use integer fixed-point arithmetic and are faster but have limited zoom range.
Switching Fractal Types
Use the Fractal Type dropdown in the controls panel to switch types. The fractal recalculates immediately at the current zoom and pan position. After switching, press Home to reset to the default view for the new type if the current coordinates don't produce an interesting result.
Controls Panel Reference
The controls panel on the right side of the app provides point-and-click access to the most common operations.
Color Cycling Group
| Control | Type | Description |
|---|---|---|
| Cycle / Stop button | Toggle button | Starts color cycling when labeled "Cycle". Stops it when labeled "Stop". Equivalent to pressing + / C and Spacebar. |
| Speed | Range slider (1–10) | Controls how fast the palette rotates. 1 = slowest (one rotation per ~10 frames), 10 = fastest (one per frame). Default is 7. Changes take effect immediately. |
| FWD / REV button | Direction toggle | Switches the cycling direction between forward and reverse. If cycling is active, direction changes immediately. If stopped, sets the direction for the next cycle start. |
Fractal Type Group
| Control | Description |
|---|---|
| Fractal Type dropdown | Select any of the 13 available fractal types. Changing the selection triggers immediate recalculation. The current zoom and pan position are preserved when switching types. |
View Group
| Control | Keyboard Equivalent | Description |
|---|---|---|
| Reset View | Home | Returns to the default full view for the current fractal type. Resets zoom and pan to initial coordinates. |
| + Zoom In | PageUp | Zooms in 2x centered on the current view. |
| - Zoom Out | PageDown | Zooms out 2x. |
| Save Image | — | Captures the current canvas to a PNG file and downloads it as fractint.png. Uses the browser's canvas API — captures exactly what is displayed, including current palette state. |
Help Hint
The small text below the View buttons summarizes the most-used keyboard shortcuts as a quick reference.
Keyboard Reference
Color Cycling
| Key | Action |
|---|---|
| + or C | Start color cycling (forward) |
| - | Start/reverse color cycling (reverse direction) |
| Spacebar | Stop color cycling |
Zoom and Navigation
| Key | Action |
|---|---|
| PageUp | Zoom in 2x |
| PageDown | Zoom out 2x |
| Home | Reset to default view |
| ↑ ↓ ← → | Pan view in that direction |
| Z | Enter zoom-box mode (draw a selection rectangle) |
| Enter | Confirm zoom-box / confirm menu selection |
| Escape | Cancel zoom-box / abort current calculation / exit menu |
Fractal and View Settings
| Key | Action |
|---|---|
| T | Open Fractint's fractal type selector menu |
| X | Toggle X-axis symmetry |
| Y | Toggle Y-axis symmetry |
| A | Toggle anti-aliasing (where supported) |
| P | Toggle periodicity checking (speeds up Mandelbrot-type calculations) |
| 1 – 9 | Set maximum iterations to 100–900 (value × 100). Higher values reveal more detail in zoomed areas at the cost of calculation time. |
| S | Save image via Fractint's built-in GIF save |
Function Keys
| Key | Action |
|---|---|
| F1 | Help — opens Fractint's built-in help system |
| F2 | Toggle image/parameter display |
| F3 | Load parameters from file |
| F4 | Save parameters to file |
| F5 | Toggle 3D mode options |
| F6 | Color map / palette selection |
| F7 | IFS (Iterated Function System) parameters |
| F8 | Basic options screen |
| F9 | Extended options screen |
| F10 | Fractint main menu |
Other Keys
| Key | Action |
|---|---|
| Tab | Cycle through active windows / dialog fields |
| Insert | Toggle orbit display (for orbit-type fractals) |
| Delete | Clear / delete in menu contexts |
| End | End / last item in list contexts |
Tips & Tricks
Finding Interesting Areas in the Mandelbrot Set
The most visually rich areas are along the boundary of the Mandelbrot set — where black (inside) meets the colored escape bands. Use these coordinates as starting points:
| Area | Description |
|---|---|
| Seahorse Valley | Around (−0.75, 0.1i) — spiraling seahorse-like forms |
| Elephant Valley | Around (0.3, 0i) — trunk-shaped protrusions |
| Double Spiral | Around (−0.16, 1.04i) — dramatic interleaved spirals |
| Mini-brots | Deep zoom any tendril to find smaller Mandelbrot copies |
Color Map Experimentation
Press F6 to open the color map selector. Fractint ships with dozens of .map files in its data directory. The altern.map, blues.map, and chroma.map files produce particularly vivid cycling effects.
Color Cycling Sweet Spots
- Newton fractals cycle beautifully — the three basins flash through color sequences.
- Deep Mandelbrot zooms near spirals show rolling wave-like motion at medium speed (5–6).
- Try very slow speed (1–2) on detailed Mandelbrot boundaries for subtle pulsing.
- Fast speed (9–10) on Sierpinski produces a rapid strobe effect.
Performance Notes
- The WASM binary runs at near-native C speed — calculation time is dominated by the fractal math, not the WebAssembly overhead.
- High iteration counts (7–9) on zoomed Mandelbrot sets can take several seconds to calculate.
- Color cycling is always full-framerate regardless of calculation time, since it only rotates the palette without recalculating.
- The Lorenz attractor renders faster than Mandelbrot-type fractals since it traces a single orbit rather than testing every pixel.
Saving and Sharing
The Save Image button captures the canvas as a PNG. For the highest-quality capture, stop color cycling first to freeze the palette in its current state.
Building from Source
The build uses Emscripten to compile the xfractint C source to WebAssembly.
Requirements
- Emscripten SDK (
emsdk) - GNU
make - A POSIX shell (macOS, Linux, or WSL)
Setup
git clone https://github.com/badvision/fractint-wasm.git cd fractint-wasm # Install and activate Emscripten (one-time setup) git clone https://github.com/emscripten-core/emsdk.git ~/emsdk cd ~/emsdk ./emsdk install latest ./emsdk activate latest source ~/emsdk/emsdk_env.sh cd /path/to/fractint-wasm
Build
# Activate Emscripten in each new terminal session source ~/emsdk/emsdk_env.sh # Compile emmake make # Output: web/fractint.js web/fractint.wasm web/fractint.data # Copy static assets into web/ (HTML, JS, CSS) emmake make deploy
Local Testing
cd web python3 -m http.server 8080 # Open http://localhost:8080 in your browser
index.html directly from the filesystem (file://) will fail due to browser CORS restrictions on WASM loading.
Build Output
| File | Description |
|---|---|
web/fractint.js | Emscripten glue code that loads and initializes the WASM module |
web/fractint.wasm | Compiled WebAssembly binary (~784 KB) |
web/fractint.data | Preloaded virtual filesystem with color maps, formula files, and parameter files (~380 KB) |
Credits
Fractint is a remarkable piece of software history, developed by the Stone Soup Group over three decades.
Original Fractint Authors (Stone Soup Group)
| Author | Contribution |
|---|---|
| Bert Tyler | Original author, primary developer |
| Timothy Wegner | Major contributor, co-author of Fractal Creations |
| Mark Peterson | Formula parser, many fractal types |
| Pieter Branderhorst | Speed optimizations, many features |
| Robin Bussell | 3D transforms and projections |
| Michael Kaufman | GIF encoder/decoder |
| Jonathan Osuch | Many fractal types |
| Wes Loewer | Boundary tracing, tesseral guessing |
...and dozens of other contributors documented in the Fractint history files.
xfractint Unix Port
The xfractint Unix/X11 port (used as the base for this WASM port) was maintained by Ken Shirriff, Tim Wegner, Sebastiano Vigna, and others.
Source and License
- Official website: fractint.org
- FTP archive: fractint.net/ftp/current/
- GitHub mirror: LegalizeAdulthood/fractint-legacy
The Fractint source code is covered by the Stone Soup License — free to use, share, and modify with attribution.
The WASM platform layer (d_wasm.c, JavaScript, CSS) for this port is released under the MIT License.