2
flame - cosmic recursive fractal flames
3
Copyright (C) 1992-2003 Scott Draves <source@flam3.com>
5
This program is free software; you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation; either version 2 of the License, or
8
(at your option) any later version.
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
#ifndef libifs_included
22
#define libifs_included
24
static char *libifs_h_id =
25
"@(#) $Id: libifs.h,v 1.15 2004/03/28 23:16:53 spotspot Exp $";
35
#define variation_random (-1)
36
#define variation_none (-1)
41
typedef double point[3];
44
double var[NVARS]; /* normalized interp coefs between variations */
45
double c[3][2]; /* the coefs to the affine part of the function */
46
double density; /* probability that this function is chosen. 0 - 1 */
47
double color; /* color coord for this function. 0 - 1 */
48
double symmetry; /* 1=this is a symmetry xform, 0=not */
53
int symmetry; /* 0 means none */
57
double brightness; /* 1.0 = normal */
58
double contrast; /* 1.0 = normal */
60
int width, height; /* of the final image */
61
int spatial_oversample;
62
double center[2]; /* camera center */
63
double vibrancy; /* blend between color algs (0=old,1=new) */
64
double hue_rotation; /* applies to cmap, 0-1 */
66
double zoom; /* effects ppu, sample density, scale */
67
double pixels_per_unit; /* vertically */
68
double spatial_filter_radius; /* variance of gaussian */
69
double sample_density; /* samples per pixel (not bucket) */
70
/* in order to motion blur more accurately we compute the logs of the
71
sample density many times and average the results. we interplate
72
only this many times. */
74
/* this much color resolution. but making it too high induces clipping */
77
/* for cmap_interpolated hack */
87
void iterate(control_point *cp, int n, int fuse, point points[]);
88
void interpolate(control_point cps[], int ncps, double time, control_point *result);
89
void print_control_point(FILE *f, control_point *cp, char *extra_attributes);
90
void random_control_point(control_point *cp, int ivar, int sym);
91
control_point *parse_control_points(char *s, int *ncps);
92
control_point *parse_control_points_from_file(FILE *f, int *ncps);
93
int add_symmetry_to_control_point(control_point *cp, int sym);
94
void estimate_bounding_box(control_point *cp, double eps,
95
double *bmin, double *bmax);
96
void rotate_control_point(control_point *cp, double by);
97
double lyapunov(control_point *cp, int ntries);
98
double random_uniform01();
99
double random_uniform11();
100
double random_gaussian();