Skip to content

zohnannor/mandelbrot-explorer-wgpu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mandelbrot Set Explorer (wgpu + winit)

A GPU-accelerated Mandelbrot set explorer I had always dreamed to make. Implemented using wgpu and winit.

Screenshots

launch
-0.875+0i

More screenshots

spirals
-1.76890083019633803652+0.00196313078063698127i
tree
-1.96674830636502062653+0.00000000208939884234i
minibrot
-0.1765599646357011443+1.08733928724540818145i
infinite-julia
-1.7692784002942480992+0.00331152861491198873i
corresponding julia
-1.7692784002942480992+0.00331152861491198873i

Features

  • Real-time rendering of Mandelbrot and Julia sets
  • Zooming and panning
  • Adjustable iteration depth
  • Fullscreen mode
  • Pretty colors

Controls

Action Input
Move W A S D
Zoom Mouse scroll
Zoom at cursor Ctrl + mouse scroll
Toggle Mandelbrot/Julia Spacebar
Toggle color rotation Q
Reset view R
Decrease iterations (100) , (comma)
Increase iterations (100) . (period)
Fullscreen toggle F11
Exit Esc

Technical Details

Implementation

  • Uses wgpu so should work on all platforms with Vulkan/Metal/DX12
  • f64 usage prevented me from porting it to web
    • May not work on your GPU due to that
  • View precision limited to ~4.3 × 1013 (floating point limits)

Building and Running

Prerequisites

  • Rust toolchain (install via rustup)
  • System with Vulkan/Metal/DX12 support
  • GPU with double-precision support (most dedicated GPUs)

Installation

Build from source:

git clone https://github.com/zohnannor/mandelbrot-explorer-wgpu
cd mandelbrot-explorer-wgpu
cargo run --release

Using cargo:

cargo install --git https://github.com/zohnannor/mandelbrot-explorer-wgpu
mandelbrot-explorer-wgpu

Performance Notes

  • Higher iteration counts provide more detail but reduce performance in certain areas of complex plane

TODO

  • Automatic max iterations
  • Palettes?
  • Ability to enter coordinates
    • And copy current

License

Licensed under either of

at your option.