mightymandel v16

GPU-based Mandelbrot set explorer

parse_mdz_corners.h File Reference


#include <stdbool.h>
#include <mpfr.h>
+ Include dependency graph for parse_mdz_corners.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


bool parse_mdz_corners (const char *source, int length, mpfr_t cx, mpfr_t cy, mpfr_t cz)
 Parse MDZ .mdz file format (corners variant).

Function Documentation

bool parse_mdz_corners ( const char *  source,
int  length,
mpfr_t  cx,
mpfr_t  cy,
mpfr_t  cz 

Parse MDZ .mdz file format (corners variant).

File format example:

precision 80
aspect 1.33333
xmin -2.5
xmax 1.5
ymax 1.5

Converting from corners is tricky, but luckily .mdz specifies the precision needed so we don't have to guess it. Then:

cz = (xmax - xmin) / (2 * aspect)
cx = (xmax + xmin) / 2
cy = (ymax - cz)

sourceA null-terminated input file already loaded into memory.
lengthLength of the input file (without the extra null terminator).
cxFor output of the real part of the view center. It is already mpfr_init2()'d.
cyFor output of the imaginary part of the view center. It is already mpfr_init2()'d.
czFor output of the view radius. It is already mpfr_init2()'d.
Success (true) or failure (false).

Definition at line 15 of file parse_mdz_corners.c.

References parse_line().

+ Here is the call graph for this function: