1 unstable release
0.1.0 | Dec 21, 2022 |
---|
#998 in Development tools
4MB
264 lines
Mandelbrot Orbits
This is a small project to learn Rust.
It generates an image of the Mandelbrot Set where each pixel color represents the period of the complex point if the point belongs to the Set.
More info about Mandelbrot Set Periods.
For now, it's using a greyscale color scheme.
Requirements
cargo
:^1.62.1
.rustc
:^1.62.1
.
Use
git clone git@github.com:josecelano/mandelbrot-orbits-rust.git
cargo run ./output/mandelbrot_2048x2048.png 2048x2048 -2.0,2.00 2.0,-2.0
Development
Execute MegaLinter locally:
./bin/ml.sh
Run tests:
cargo test
Math
You can find an explanation here.
And I'm trying to find and write a more formal explanation of the math behind the algorithm.
Credits
- Jeremy Rifkin pointed me at the solution. I have copied/pasted part of his code to detect the period.
- Jim Blandy, Programming Rust Book's Author.
- Jason Orendorff, Programming Rust Book's Author.
Links
Repositories
- Same thing in C++ by Jeremy Rifkin.
- Mandelbrot Trajectory Infima by Jeremy Rifkin.
- Initial code to plot the Mandelbrot Set was forked from the O'Reilly Programming Rust book.
- Mandelbrot in C language with arbitrary precision.
- Periodic points of a complex quadratic polynomial using Newton method by Adam Majewski.
- Numerical periodicity detection of a polynomial and rational Julia set.
Papers
- An Introduction to Complex Dynamics and the Mandelbrot Set by professor Robert L. Benedetto.
- Displaying the Internal Structure of the Mandelbrot Set by Adam Cunningham.
- Newton's method in practice II: The iterated refinement Newton method and near-optimal complexity for finding all roots of some polynomials of very large degrees.
Books
Wikibook
Demos
Other
Dependencies
~13–23MB
~121K SLoC