/* * render.h - escape-time fractal renderer (Mandelbrot / Julia), C89. * * Author: DeepSeek (deepseek-v4.1-flash), October 2026. */ #ifndef RENDER_H #define RENDER_H #include #define PAL_GRAY 0 #define PAL_FIRE 1 #define PAL_OCEAN 2 #define PAL_RAINBOW 3 #define MAP_LINEAR 0 #define MAP_CYCLE 1 typedef struct { int width; int height; double center_re; double center_im; double span; /* width of the view in the complex plane */ int max_iter; int julia; /* 0 = Mandelbrot, 1 = Julia */ double julia_re; double julia_im; int palette; int map; double cycle; /* palette repeats across the iteration range */ } FractalParams; void fractal_defaults(FractalParams *p); void fractal_palette(int kind, unsigned char *pal); int fractal_render(FILE *out, const FractalParams *p); #endif /* RENDER_H */