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

  1. 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.
  2. Click the canvas to give it keyboard focus. You'll see a thin focus ring appear. All keyboard shortcuts require focus.
  3. Press PageUp to zoom into an area, or use the Zoom In button in the controls panel on the right.
  4. Press + or C to start color cycling and watch the fractal come alive.
Note
The canvas needs keyboard focus for key bindings to work. If keypresses are being ignored, click the canvas once to refocus it.

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

+ or C
Start color cycling (forward direction)
-
Reverse color cycling direction (or start cycling in reverse)
Spacebar
Stop color cycling

Controls Panel

ControlFunction
Cycle buttonToggle color cycling on/off. Shows "Cycle" when stopped, "Stop" when active.
Speed sliderPalette rotation speed. Range 1–10. Value 7 is the default (smooth, medium pace).
Direction buttonToggle forward/reverse cycling. Shows "FWD" or "REV". Changes take effect immediately if cycling is active.
Tip
Try different fractal types with color cycling. Newton fractals produce striking color wheel effects. Sierpinski triangles show crisp band cycling. Lorenz attractors trace glowing orbits.

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.

Mandelbrot (FP / int)
The classic: z = z² + c iterated from z=0. The most-explored fractal. Infinite self-similar detail at every scale. Start here.
Julia (FP / int)
Like Mandelbrot, but c is fixed and the starting z varies. Each point in the Mandelbrot plane corresponds to a unique Julia set. Connected when c is inside the Mandelbrot set.
Newton
Newton's root-finding method applied to complex polynomials. Convergence basins create flower-like boundaries with intricate color gradients. The default polynomial is z³ − 1 = 0.
Newton Basin
Variant of Newton's method showing which root each point converges to, colored by root identity rather than iteration count. Produces stark tricolor (or more) basins of attraction.
Complex Newton
Newton method on complex functions beyond simple polynomials. Produces richer, more varied boundary structure than the standard Newton fractal.
Sierpinski (FP / int)
The Sierpinski triangle — a self-similar gasket produced by a simple IFS (iterated function system). Distinct from Mandelbrot-style escape-time fractals; fills quickly at any zoom.
Barnsley M1 (FP / int)
Michael Barnsley's Mandelbrot variant using a different complex function. Produces forms that resemble ferns and plant structures. Related to iterated function systems.
Lorenz (FP)
The Lorenz strange attractor — a 3D dynamical system projected onto the plane. Produces the famous butterfly-shaped orbit. Not an escape-time fractal; uses orbit tracing.
Marks Mandelbrot (FP)
A Mandelbrot variant by Kevin Marks using a modified iteration formula. Produces Mandelbrot-like forms with distinctive internal structure differences.

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.

Note
Fractint supports 200+ fractal types internally. The dropdown exposes the most visually distinct types. Additional types can be accessed via the T key which opens Fractint's built-in fractal type menu.

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

ControlTypeDescription
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

ControlDescription
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

ControlKeyboard EquivalentDescription
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

Important
The canvas must have keyboard focus for these keys to work. Click the canvas once to focus it. A thin outline appears when it is focused.

Color Cycling

KeyAction
+ or CStart color cycling (forward)
-Start/reverse color cycling (reverse direction)
SpacebarStop color cycling

Zoom and Navigation

KeyAction
PageUpZoom in 2x
PageDownZoom out 2x
HomeReset to default view
Pan view in that direction
ZEnter zoom-box mode (draw a selection rectangle)
EnterConfirm zoom-box / confirm menu selection
EscapeCancel zoom-box / abort current calculation / exit menu

Fractal and View Settings

KeyAction
TOpen Fractint's fractal type selector menu
XToggle X-axis symmetry
YToggle Y-axis symmetry
AToggle anti-aliasing (where supported)
PToggle periodicity checking (speeds up Mandelbrot-type calculations)
19Set maximum iterations to 100–900 (value × 100). Higher values reveal more detail in zoomed areas at the cost of calculation time.
SSave image via Fractint's built-in GIF save

Function Keys

KeyAction
F1Help — opens Fractint's built-in help system
F2Toggle image/parameter display
F3Load parameters from file
F4Save parameters to file
F5Toggle 3D mode options
F6Color map / palette selection
F7IFS (Iterated Function System) parameters
F8Basic options screen
F9Extended options screen
F10Fractint main menu

Other Keys

KeyAction
TabCycle through active windows / dialog fields
InsertToggle orbit display (for orbit-type fractals)
DeleteClear / delete in menu contexts
EndEnd / last item in list contexts
Note
Function key behavior and menu-based keys (F1–F10, T, X, Y, etc.) open Fractint's internal text-mode menu system, which renders into the canvas using the original DOS-style text UI. Navigate menus with the arrow keys and Enter; press Escape to exit.

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:

AreaDescription
Seahorse ValleyAround (−0.75, 0.1i) — spiraling seahorse-like forms
Elephant ValleyAround (0.3, 0i) — trunk-shaped protrusions
Double SpiralAround (−0.16, 1.04i) — dramatic interleaved spirals
Mini-brotsDeep 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

Performance Notes

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.

Tip
Interesting zoomed locations are defined by their X/Y coordinates and zoom level (magnification). To revisit a location, note the parameters from Fractint's parameter display (F2) before navigating away.

Building from Source

The build uses Emscripten to compile the xfractint C source to WebAssembly.

Requirements

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
Warning
WebAssembly requires a proper HTTP server — opening index.html directly from the filesystem (file://) will fail due to browser CORS restrictions on WASM loading.

Build Output

FileDescription
web/fractint.jsEmscripten glue code that loads and initializes the WASM module
web/fractint.wasmCompiled WebAssembly binary (~784 KB)
web/fractint.dataPreloaded 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)

AuthorContribution
Bert TylerOriginal author, primary developer
Timothy WegnerMajor contributor, co-author of Fractal Creations
Mark PetersonFormula parser, many fractal types
Pieter BranderhorstSpeed optimizations, many features
Robin Bussell3D transforms and projections
Michael KaufmanGIF encoder/decoder
Jonathan OsuchMany fractal types
Wes LoewerBoundary 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

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.