/* * XaoS, a fast portable realtime fractal zoomer * Copyright (C) 1996,1997 by * * Jan Hubicka (hubicka@paru.cas.cz) * Thomas Marsh (tmarsh@austin.ibm.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef FRACTAL1_H #define FRACTAL1_H #ifdef __cplusplus extern "C" { #endif #include "config.h" #include "fconfig.h" #define INCOLORING 11 #define OUTCOLORING 11 #define TCOLOR 15 typedef struct { number_t y0, k; } symetrytype; struct symetryinfo { number_t xsym, ysym; int nsymetries; CONST symetrytype *symetry; }; typedef struct { number_t mc, nc; number_t mi, ni; } vrect; typedef struct { number_t cr, ci; number_t rr, ri; } vinfo; typedef unsigned int (*iterationfunc) (number_t, number_t, number_t, number_t) CONSTF REGISTERS(3); struct formula { int magic; #ifndef SLOWFUNCPTR iterationfunc calculate, calculate_periodicity, smooth_calculate, smooth_calculate_periodicity; #endif void (*calculate_julia) (struct image * img, register number_t pre, register number_t pim); CONST char *name[2]; CONST char *shortname; vinfo v; int hasperiodicity; int mandelbrot; number_t pre, pim; struct symetryinfo (out[OUTCOLORING + 1]); struct symetryinfo (in[INCOLORING + 1]); int flags; }; struct fractal_context { number_t pre, pim; number_t bre, bim; CONST struct formula *currentformula; number_t angle; int periodicity; unsigned int maxiter; number_t bailout; int coloringmode, incoloringmode; int intcolor, outtcolor; int mandelbrot; int plane; int version; int range; float windowwidth, windowheight; vinfo s; vrect rs; number_t sin, cos; int slowmode; /* 1 in case we want to be exact, not fast */ /*values temporary filled by set_fractal_context */ iterationfunc calculate[2]; number_t periodicity_limit; struct palette *palette; /*fractal's palette */ }; typedef struct fractal_context fractal_context; typedef struct { double y0, k, kk, y0k; } symetry2; struct symetryinfo2 { number_t xsym, ysym; int nsymetries; symetry2 *symetry; number_t xmul, ymul, xdist, ydist; }; #define STARTZERO 1 #define JULIA_BTRACE 2 #define MANDEL_BTRACE 4 #ifdef SFFE_USING #define SFFE_FRACTAL 8 #endif #define BTRACEOK ((cformula.flags&(2< #ifdef __cplusplus } #endif #endif /* FRACTAL_H */