Mandelbrot set by c++ template meta functions

extensive use of recursive template definitions forces your favorite c++ compiler to calculate

the Mandelbrot set at _compile_time_. the executable will contain nothing but the printf. since

the standard template recursion depth of 17 is slightly exceeded, one needs to enlarge it, for

example with '-ftemplate-depth-NN' for GNU g++.

inspired by Joerg Striegnitz, see http://www.fz-juelich.de/zam/FACT/

author: Andreas Knuepfer, (C) 2000

knuepfer@zhr.tu-dresden.de or see http://www.wh2.tu-dresden.de/~knuepfer/tmf/

the example code is under GNU GPL, get it here.


results

insane resolution

this is how it should be, however the resolution is insane for TMFs.

by size

by depth

size 10, depth 20

size 10, depth 20

size 40, depth 10

size 40, depth 10

size 20, depth 20

size 20, depth 20

size 40, depth 20

size 40, depth 20

size 30, depth 20

size 30, depth 20

size 40, depth 30

size 40, depth 30

size 40, depth 20

size 40, depth 20

size 40, depth 40

size 40, depth 40

size 52, depth 20

size 52, depth 20


compile times

compile time against SIZE

compile time grows like O(SIZE^2) for a gfx of SIZE x SIZE / 2 pixels. btw it is quite long!!

(the "linear steps" in the graph are of artificial nature, since height is always forced to be SIZE / 2 and odd)

compile time against DEPTH

compile time grows linearly with recursion depth.


Andreas Knuepfer, 2000-11-08