Skip to content

Instantly share code, notes, and snippets.

@ztellman
Created October 8, 2009 05:55
Show Gist options
  • Save ztellman/204791 to your computer and use it in GitHub Desktop.
Save ztellman/204791 to your computer and use it in GitHub Desktop.
(defmap color-fractal
(let [val %
z (.xy val)
n (.z val)
escape (/ n (float max-iterations))]
(? (< 4.0 (dot z z))
(color3 escape escape (mix 0.2 1.0 escape))
(color3 0.0 0.0 0.0))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment