Skip to content

Instantly share code, notes, and snippets.

@PaulSandoz
Created November 2, 2011 14:38
Show Gist options
  • Save PaulSandoz/1333795 to your computer and use it in GitHub Desktop.
Save PaulSandoz/1333795 to your computer and use it in GitHub Desktop.
(defn image-mandel
([size a b limit]
(let [[_ _ ms] (mandelbrot-seqs 1 size a b limit)
[_ _ image] (image-mandel-doseq (first ms) limit)]
image))
([n size a b limit]
(let [[w h ms] (mandelbrot-seqs n size a b limit)
image (BufferedImage. w h BufferedImage/TYPE_INT_RGB)
raster (.getRaster image)]
(dorun
(map #(set-rect % raster)
(pmap #(image-mandel-doseq %1 limit) ms)))
image)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment