Created
October 11, 2009 01:41
-
-
Save JonathanSmith/207316 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defmap rgb-color-fractal | |
(let [val % | |
z (.xy val) | |
n (.z val) | |
normalized-count (/ (- n (log2 (log2 (sqrt (+ (* (.x z) (.x z)) (* (.y z) (.y z))))))) | |
(float max-iterations))] | |
(? (< 4.0 (dot z z)) | |
(color3 normalized-count normalized-count (mix 0.2 1.0 normalized-count)) | |
(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