Fractol 1.0
A fractal visualization project implemented in C.
|
Implementation of the Mandelbrot set rendering. More...
#include "fractol.h"
Go to the source code of this file.
Functions | |
static void | compute_next_iteration (t_render_vars *vars, int i) |
Computes the next iteration for a single point in the Mandelbrot set. | |
static void | mandelbrot_iterations (t_render_vars *vars, int i) |
Performs the iterations 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. | |
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. | |
Implementation of the Mandelbrot set rendering.
This file contains all the functions necessary to compute and render the Mandelbrot set fractal. The Mandelbrot set is a visual representation off a mathematical formula applied to complex numbers. THe complexity and beauty of its patterns arise from how quickly or slowly each point "escapes" beyond a defined boundary.
z = z^2 + c
, where:z
starts at (0, 0) for every point.c
is the complex number corresponding to the pixel's position on the screen.|z|2 > 4
(escape condition) or the maximum number of iterations is reached.Definition in file mandelbrot.c.
|
static |
Computes the next iteration for a single point in the Mandelbrot set.
Definition at line 54 of file mandelbrot.c.
|
static |
Performs an early scape check for a point in the Mandelbrot set.
Definition at line 97 of file mandelbrot.c.
|
static |
Performs the iterations for a single point in the Mandelbrot set.
Definition at line 70 of file mandelbrot.c.
void render_mandelbrot | ( | t_data * | data | ) |
Renders the Mandelbrot set fractal.
Render the Mandelbrot fractal.
Definition at line 151 of file mandelbrot.c.
|
static |
Renders a single row of the Mandelbrot set.
Definition at line 121 of file mandelbrot.c.