mightymandel v16

GPU-based Mandelbrot set explorer

parse_kfr.h File Reference

(v16)

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

Go to the source code of this file.

Functions

bool parse_kfr (const char *source, int length, mpfr_t cx, mpfr_t cy, mpfr_t cz)
 Parse Kalles Fraktaler .kfr file format.

Function Documentation

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

Parse Kalles Fraktaler .kfr file format.

File format example:

Re: -0.75
Im: 0.0
Zoom: 1E0

Line endings are typically CRLF as Kalles Fraktaler is a Windows program. The zoom field \(z\) contains a number that gets larger as you zoom in, but it is easy enough to convert to a radius \(r\): \(r = \frac{2}{z}\). Also, Kalles Fraktaler displays upside down. Rendered images look like they do in Kalles Fraktaler when the imaginary coordinate is inverted, so we do that too.

Parameters
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.
Returns
Success (true) or failure (false).

Definition at line 15 of file parse_kfr.c.

References parse_line(), precision_for_radius(), and radius_is_valid().

+ Here is the call graph for this function: