Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(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