Visualize the Mandelbrot Set with a series of computing, mapping, and rendering tools.
Take a look at the 2 Gigapixel Zoomable version of the image above.
Confirm you have Ruby installed by running ruby -v
. Using Ruby 2.6.6 at the time this was written.
ruby 2.6.6p146 (2020-03-31 revision 67876) [x64-mingw32]
Clone the repository using git clone https://github.com/jefamirault/mandelbrot.git
Cloning into 'mandelbrot'...
remote: Enumerating objects: 183, done.
remote: Counting objects: 100% (183/183), done.
remote: Compressing objects: 100% (69/69), done.
Receiving objects: 100% (183/183)used 178 (delta 111), pack-reused 0 eceiving objects: 93% (171/183)
Receiving objects: 100% (183/183), 235.07 KiB | 3.09 MiB/s, done.
Resolving deltas: 100% (116/116), done.
Run bundle
to install gems from Gemfile
Using bundler 1.17.2
Using chunky_png 1.3.11
Using colorize 0.8.1
Using oily_png 1.2.1
Using simple_test 0.1.0 from https://github.com/jefamirault/simple_test.git (at master@524f6e0)
Bundle complete! 3 Gemfile dependencies, 5 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
- Simple Test - Simple Test Framework
- colorize - Colorful console output in Windows
- ChunkyPNG/OilyPNG - Output .png images
Initialize Mandelbrot object with a complex number and the number of iterations to compute.
number_to_test = Complex(0, 0)
iterations = 20
mandelbrot = Mandelbrot.new(number_to_test, iterations)
mandelbrot.member?
# true
puts mandelbrot.verbose
# The number 0+0i has 20 iterates with magnitude less than two out of 20 explored.
# 0+0i meets the criteria for set membership at 20 iterations.
Seahorse Valley - Gigapixel Render
Unit Tests:
./test
Render Tests:
./test render
Unit Tests:
./test.sh
Render Tests:
./test.sh render
- Define render parameters in a blueprint file.
{
"label": "Pinwheel",
"directory": "renders/test/pinwheel",
"center": [0.281717921930775, 0.5771052841488505],
"iterations": 8000,
"step": 6.0e-10,
"resolution": [740, 416],
"grid_size": 16
}
- Create a job queue from the blueprint.
ruby lib/controller.rb blueprint/sample.json queue
- Process jobs from the queue. On Linux and Mac you may optionally pass a number_of_processes argument for parallel processing. On Windows you must start each process manually. (version 0.1.0)
ruby lib/controller.rb blueprint/sample.json process 4
- Combine tiles into final composite image.
### after all workers are complete
ruby lib/controller.rb blueprint/sample.json composite
Search issues on our Redmine Server before submitting bugs or pull requests. Contributions, suggestions, feedback all welcome!