A naive Mandlebrot set demonstration inspired by Peter Westmacott's excellent talk at re:Clojure.
This version is written in Clojurescript with a simple click to zoom in function allowing you to explore areas like the Seahorse Valley.
You can try it on my GitHub Page.
When starting shadow-cljs with shadow-cljs watch app
make note of the nREPL port logged out.
Connect to http://localhost:8020/mandelbrot-cljs/
to view the mandelbrot.
Create a remote REPL that connects to that specific port.
Once your REPL is running use the command (shadow/repl :app)
to connect to the shadow-cljs REPL
As Cursive is my editor of choice, there are a number of hoops to jump through
You can make intellij copy the .shadow-cljs/nrepl.port
file to .nrepl-port
as a "Before Launch" action
to make Cursive auto-connect to nRepl. This works by making it think it's a lein project see
thheller/shadow-cljs#524
I've implemented two options for rendering the values outside the Mandelbrot set based on their iteration counts.
Use this for a clear view of the different bands/iteration counts. This scheme is based on the concept of using the Golden Ratio to choose random colours that are easy to distinguish.
Use this colour scheme for aesthetics, it's much nicer to look at!