A version of the mandelbrot set in Go
sudo apt-get install libsdl2-dev
go get github.com/veandco/go-sdl2
go get github.com/tomcraven/go-mandelbrot
go run *.go [optional: theme-name]
e.g.
go run *.go fire
Where theme-name
is one of the themes in colour.go, currently:
full-spectrum
fire
leaf
water
beach
(default)random
Arrow keys to move a round, 'z' and 'x' to zoom, 'a' and 's' in increase/decrease the level of detail
When the zoom or detail level is high, there is a fair bit of screen tearing. The benefit of this is that overall on most machines, the image takes less time to render. I need to spend some time fiddling with using SDL2 properly and double buffering the screen.