Created
November 2, 2011 15:04
-
-
Save PaulSandoz/1333859 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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