webgl fractal browser
Find a file
CyberVitexus 4dead47dec readme fix
2026-02-21 11:31:20 +01:00
debian release: v1.1.1 2026-02-21 10:44:33 +01:00
etc/apache2/conf-available Remove all server-side functionality, make fractalus a pure web application 2026-02-21 09:55:12 +01:00
.gitignore Update .gitignore and control file for Debian packaging: add missing files and adjust dependencies 2026-02-08 02:29:17 +01:00
AGENTS.md Remove all server-side functionality, make fractalus a pure web application 2026-02-21 09:55:12 +01:00
fractalus-screenshot.png docs: update README with current features and fix screenshot link 2026-02-21 11:26:46 +01:00
index.html feat: add hashtags to Mastodon share text 2026-02-21 10:43:35 +01:00
mandelbrot-renderer.js feat: add fractal type chooser, rotation controls 2026-02-21 10:41:10 +01:00
README.md readme fix 2026-02-21 11:31:20 +01:00

Fractalus WebGL Renderer

Fractalus Screenshot

A high-performance WebGL-based fractal renderer supporting multiple fractal formulas, rotation, color cycling, and SVG export.

Supported Fractals

  • Mandelbrot — classic z² + c escape-time fractal
  • Burning Ship — uses absolute values: (|Re(z)| + i|Im(z)|)² + c
  • Tricorn — conjugate variant: conj(z)² + c
  • Julia — fixed c parameter, z starts at pixel position
  • Phoenix — z² + Re(c) + Im(c)·z_{n-1} with memory of previous iteration
  • Newton (z³1) — Newton's method root-finding, colored by convergence

Features

  • Multiple Fractal Types: Switch between 6 formulas via dropdown selector
  • Rotation: Toggle auto-rotation with adjustable speed (0.1x5.0x)
  • WebGL Rendering: Hardware-accelerated fractal computation using GPU shaders
  • Fullscreen Mode: Immersive full-screen exploration with F key toggle
  • Intelligent Autopilot: Automatic exploration with smart navigation to interesting regions
  • Mouse Wheel Navigation: Precise cursor-centered zooming
  • Palette Control: Left/right mouse buttons for color palette stepping, hold for continuous cycling
  • Color Cycling: Smooth automatic color transitions with adjustable speed
  • SVG Export: Captures WebGL framebuffer as scalable SVG with metadata JSON
  • Deep Linking: URL parameters for sharing specific views
  • Mastodon Sharing: Client-side sharing via Web Intent with clipboard image copy and hashtags

Quick Start

Just open index.html in a browser, or serve the directory:

python3 -m http.server 8000
# Open http://localhost:8000

Interactive Controls

Navigation

  • Mouse Wheel: Zoom in/out centered on cursor position
  • Middle Mouse Drag: Pan around the fractal
  • F Key: Toggle fullscreen
  • Escape: Exit autopilot mode

Fractal Selection

  • Fractal dropdown: Switch between formulas (view resets to optimal defaults per type)

Rotation

  • 🔄 Rotation: Toggle auto-rotation on/off
  • Speed slider: Adjust rotation speed (full revolution per 20s at 1.0x)

Color Palette

  • Left Mouse Click: Step to previous palette (25°)
  • Right Mouse Click: Step to next palette (+25°)
  • Hold Mouse: Continuously cycle through palettes
  • Arrow Keys: Left/Right rotate colors (±15°), Shift for fine (±5°)
  • R Key: Reset color palette

Autopilot

  • 🚁 Start Autopilot: Automatic exploration with smart zoom, panning, and color changes
  • Visits curated interesting locations (seahorse valleys, spiral areas, etc.)
  • Smooth 25 second transitions, 28 second intervals
  • Press Esc to stop

Screenshots & Sharing

  • 📸 Take Screenshot: Save SVG + metadata JSON with file picker dialog
  • 🐘 Share to Mastodon: Copy image to clipboard, open Mastodon with pre-filled post text and hashtags

URL Parameters

  • type — fractal type (0=Mandelbrot, 1=Burning Ship, 2=Tricorn, 3=Julia, 4=Phoenix, 5=Newton)
  • cx, cy — center coordinates
  • z — zoom level
  • iter — max iterations
  • offset, scale — color palette parameters
  • rot — rotation angle (radians)
  • jcx, jcy — Julia set c parameter
  • palette — named preset (default, fire, ocean, neon, pastel)

Technical Details

WebGL Shaders

  • Single fragment shader with branching for all 6 fractal formulas
  • Coordinate rotation via uniform angle applied before iteration
  • Newton fractal uses convergence-based coloring (root detection via atan)
  • Complex arithmetic helpers (complexMul, complexDiv) for Newton's method
  • HSV to RGB conversion for vibrant color generation

SVG Generation

  • Reads WebGL framebuffer pixel data
  • Groups pixels by color and merges adjacent pixels into rectangles
  • Includes fractal name and timestamps in SVG metadata

Browser Requirements

  • WebGL support
  • ES6 JavaScript support

Installation

Debian/Ubuntu

Packages are available. Please use the repo:

wget -qO- https://repo.vitexsoftware.com/KEY.gpg | sudo tee /etc/apt/trusted.gpg.d/vitexsoftware.gpg
echo "deb [signed-by=/etc/apt/trusted.gpg.d/vitexsoftware.gpg]  https://repo.vitexsoftware.com  $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/vitexsoftware.list
sudo apt update
sudo apt install fractalus

The installed package serves the app via Apache at /fractalus and provides a fractalus launcher command.

Building from Source

dpkg-buildpackage -us -uc -b

Enjoy exploring the infinite complexity of fractals!