Lately I've been learning C. Recently I shared the story of how I got hooked on programming on Developer on Fire 139. In so doing, I seem to have revived my own interest in the Mandelbrot set. Now I'm drawing it in C:
- Extract math backends: native C real math, native C complex math, GNU MPC.
- Add performance tests for math and graphics.
- Add math backend: GNU Scientific Library.
- Add a graphics backend that draws to a window on screen.
- Profile: where are we spending our time?
- Choose colormap size at runtime.
- Compute escape times in parallel threads.
- Improve safety and style of
graph_t.image
declaration. - Determine whether arbitrary-precision complex math can be made faster.
- Determine when arbitrary-precision complex math is worth doing.
- Use GNU Automake, Autoconf, Libtool.
- If iterating over every pixel is slow, try:
- parallelizing computation in multiple threads (with OpenMP or similar)
- offloading to a GPU (with OpenCL or similar)
- tracing the boundary
- Auto-scale number of iterations with zoom level.
- Fix Valgrind errors.
- On OS X, try Guard Malloc.
- Try using C++ ApprovalTests to check the generated image.
- Try
astyle
. - Try
cppcheck
. - In a Mac GUI, display the initial image (then maybe add features).
- In an iPhone app, pinch to zoom (then maybe port to iPad).
- Get ideas from XaoS or Fractint.
- Get optimization ideas from mandelbrot-js.