Skip to content

schmonz/c-mandelbrot

Repository files navigation

c-mandelbrot

Build status

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:

Latest Image

TODO

  1. Extract math backends: native C real math, native C complex math, GNU MPC.
  2. Add performance tests for math and graphics.
  3. Add math backend: GNU Scientific Library.
  4. Add a graphics backend that draws to a window on screen.
  5. Profile: where are we spending our time?
  6. Choose colormap size at runtime.
  7. Compute escape times in parallel threads.
  8. Improve safety and style of graph_t.image declaration.
  9. Determine whether arbitrary-precision complex math can be made faster.
  10. Determine when arbitrary-precision complex math is worth doing.
  11. Use GNU Automake, Autoconf, Libtool.
  12. 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
  13. Auto-scale number of iterations with zoom level.
  14. Fix Valgrind errors.
  15. On OS X, try Guard Malloc.
  16. Try using C++ ApprovalTests to check the generated image.
  17. Try astyle.
  18. Try cppcheck.
  19. In a Mac GUI, display the initial image (then maybe add features).
  20. In an iPhone app, pinch to zoom (then maybe port to iPad).
  21. Get ideas from XaoS or Fractint.
  22. Get optimization ideas from mandelbrot-js.