Skip to content

Instantly share code, notes, and snippets.

@PaulSandoz
Created November 2, 2011 15:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulSandoz/1333859 to your computer and use it in GitHub Desktop.
Save PaulSandoz/1333859 to your computer and use it in GitHub Desktop.
(defn- image-mandel-doseq
([[dx dy w h m] limit]
(let [image (BufferedImage. w h BufferedImage/TYPE_INT_RGB)]
(image-mandel-doseq dx dy m image limit)))
([dx dy m ^BufferedImage image limit]
(let [raster (.getRaster image)]
(doseq [[x y rate] m]
(.setPixel raster (int (- x dx)) (int (- y dy)) (ints (rgb (angle rate limit)))))
[dx dy image])))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment