programming_rust/mandelbrot
Elf M. Sternberg 1471a14f1a Implemented the Mandelbrot set from Chapter 2 of Programming Rust
This implementation features concurrency, a little object-oriented code,
and some old-school PNM.
2018-08-24 10:31:23 -07:00
..
src Implemented the Mandelbrot set from Chapter 2 of Programming Rust 2018-08-24 10:31:23 -07:00
Cargo.toml Implemented the Mandelbrot set from Chapter 2 of Programming Rust 2018-08-24 10:31:23 -07:00
README.md Implemented the Mandelbrot set from Chapter 2 of Programming Rust 2018-08-24 10:31:23 -07:00
mandel.png Implemented the Mandelbrot set from Chapter 2 of Programming Rust 2018-08-24 10:31:23 -07:00

README.md

Mandelbrot

An implementation of the the Mandelbrot set exercise from the end of chapter two of O'Reilly's Programming Rust.

I have deviated from the original in two ways, one major, one minor.

First, I've made the rendering plane, which maps from the cartesian (pixel) plane to the complex plane, into a struct, and put all the major rendering features into an implementation on that struct. By adding a simple method, subplane(), I was able to make crossbeam rendering much simpler and easier to read by providing horizontal slices of the pixel plane, and I was also able to avoid recalculating the relationship between the two planes for every pixel. A small performance boost, but worthwhile.

Second, the output is PNM rather than PNG. I'm a huge PNM partisan, and you kids better get off my lawn.