An open API service indexing awesome lists of open source software.

https://github.com/vkazanov/fractals-in-c

Simple fractal generators written in pure C
https://github.com/vkazanov/fractals-in-c

Last synced: 3 months ago
JSON representation

Simple fractal generators written in pure C

Awesome Lists containing this project

README

        

A few fractal-generating programs from a vintage book ([[https://www.amazon.co.uk/Fractal-Programming-Roger-T-Stevens/dp/1558510370/][Fractal Programming in C]]).
1989-style C code was completely rewritten, and generates [[https://en.wikipedia.org/wiki/Netpbm#File_formats][Netpbm]] files now.

The book is ok, but there's no particular reason I would recommend it over any other book.

* Compiling and running

Examples should easy to build on any Linux using a recent GCC and GNU Make:

#+begin_src shell-script
make
# -o for an output file
./mandelbrot -o output.ppm
see output.ppm
#+end_src

Some of the programs accept additional arguments but defaults should be fine too.

* A few examples

Mandelbrot set:

[[file:examples/mandelbrot.png]]

Peano curve:

[[file:examples/peano.png]]

Hilbert curve:

[[file:examples/hilbert.png]]

Bifurcation equation:

[[file:examples/bifurcation.png]]

A simple tree:

[[file:examples/tree.png]]

Koch snowflake:

[[file:examples/koch.png]]

Sierpinsky triangle:

[[file:examples/sierpinski.png]]