59 temp_z_re += vars->
c_re[i];
72 double current_magnitude_squared;
73 double escape_radius_squared;
75 escape_radius_squared = 4.0;
87 if (current_magnitude_squared > escape_radius_squared)
102 double bound_condition;
109 if ((data->
zoom > 1.0) && (esc_chk < 0.25 * vars->
c_im * vars->
c_im))
110 return (vars->
row[i] = max_color, 1);
111 bound_condition = (vars->
c_re[i] + 1) * (vars->
c_re[i] + 1);
112 bound_condition += vars->
c_im * vars->
c_im;
113 if (bound_condition < 0.0625)
114 return (vars->
row[i] = max_color, 1);
154 double *precomputed_c_re;
155 double *precomputed_c_im;
164 vars.
c_im = precomputed_c_im[y];
167 free(precomputed_c_re);
168 free(precomputed_c_im);
int precompute_coords(double **c_re, double **c_im, t_render_vars *vars)
Precomputes the coordinates for each pixel in the fractal.
void calculate_scales_and_limits(t_render_vars *vars, t_data *data)
Calculates the scales and starting points for the fractal rendering.
int calculate_color(int iterations)
Calculates the color of a pixel based on how many iterations it takes to "escape".
static void render_mandelbrot_row(t_render_vars *vars, t_data *data, int y)
Renders a single row of the Mandelbrot set.
void render_mandelbrot(t_data *data)
Renders the Mandelbrot set fractal.
static void mandelbrot_iterations(t_render_vars *vars, int i)
Performs the iterations for a single point in the Mandelbrot set.
static void compute_next_iteration(t_render_vars *vars, int i)
Computes the next iteration for a single point in the Mandelbrot set.
static int mandelbrot_escape_check(t_render_vars *vars, int i, t_data *data)
Performs an early scape check for a point in the Mandelbrot set.
Data structure for fractal rendering.
Variables used for fractal rendering calculations.