The Mandelbrot set, computed by alcove

Every pixel's escape count is computed by a Lisp program — the kernel below — running as WebAssembly in your browser. The same scalar-float loop compiles to native machine code (≈ C speed) when alcove runs natively.

loading the alcove runtime…

The kernel (run for every pixel):

(def mb (cr ci zr zi i)
  (if (>= i 100) i
    (if (> (+ (* zr zr) (* zi zi)) 4.0) i
      (mb cr ci (+ (- (* zr zr) (* zi zi)) cr)
                (+ (* 2.0 (* zr zi)) ci)
                (+ i 1)))))

› alcove REPL  ·  › playground  ·  › draw a digit  ·  › learn alcove