Skip to content

schmonz/c-mandelbrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6cf5f07 · Nov 29, 2024
Nov 29, 2024
Jul 22, 2016
May 29, 2021
Nov 29, 2024
Jul 22, 2016
May 29, 2021
Oct 14, 2018
Jul 27, 2017
Jul 27, 2017
Jul 27, 2017
Jul 27, 2017
Jul 27, 2017
Jul 22, 2016
Jul 27, 2017
Jul 23, 2016
Jul 25, 2016
Jul 22, 2016

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.