MythTV  master
ifs.cpp
Go to the documentation of this file.
1 /* -*- Mode: C; tab-width: 4 -*- */
2 /* ifs --- modified iterated functions system */
3 
4 //#if !defined( lint ) && !defined( SABER )
5 //static const char sccsid[] = "@(#)ifs.c 5.00 2002/04/11 baffe";
6 //#endif
7 
8 /*-
9  * Copyright (c) 1997 by Massimino Pascal <Pascal.Massimon@ens.fr>
10  *
11  * Permission to use, copy, modify, and distribute this software and its
12  * documentation for any purpose and without fee is hereby granted,
13  * provided that the above copyright notice appear in all copies and that
14  * both that copyright notice and this permission notice appear in
15  * supporting documentation.
16  *
17  * This file is provided AS IS with no warranties of any kind. The author
18  * shall have no liability with respect to the infringement of copyrights,
19  * trade secrets or any patents by this file or any part thereof. In no
20  * event will the author be liable for any lost revenue or profits or
21  * other special, indirect and consequential damages.
22  *
23  * If this mode is weird and you have an old MetroX server, it is buggy.
24  * There is a free SuSE-enhanced MetroX X server that is fine.
25  *
26  * When shown ifs, Diana Rose (4 years old) said, "It looks like dancing."
27  *
28  * Revision History:
29  * 11-Apr-2002: Make ifs.c system-indendant. (ifs.h added)
30  * 01-Nov-2000: Allocation checks
31  * 10-May-1997: jwz@jwz.org: turned into a standalone program.
32  * Made it render into an offscreen bitmap and then copy
33  * that onto the screen, to reduce flicker.
34  */
35 
36 //#ifdef STANDALONE
37 
38 #include <cmath>
39 #include <cstdio>
40 #include <cstdlib>
41 
42 #include "ifs.h"
43 
44 #define MODE_ifs
45 
46 #define PROGCLASS "IFS"
47 
48 #define HACK_INIT init_ifs
49 #define HACK_DRAW draw_ifs
50 
51 #define ifs_opts xlockmore_opts
52 
53 #define DEFAULTS "*delay: 20000 \n" \
54  "*ncolors: 100 \n"
55 
56 #define SMOOTH_COLORS
57 
58 //#include "xlockmore.h" /* in xscreensaver distribution */
59 //#else /* STANDALONE */
60 //#include "xlock.h" /* in xlockmore distribution */
61 //#endif /* STANDALONE */
62 
63 //#ifdef MODE_ifs
64 
65 //ModeSpecOpt ifs_opts =
66 //{0, (XrmOptionDescRec *) NULL, 0, (argtype *) NULL, (OptionStruct *) NULL};
67 
68 //#ifdef USE_MODULES
69 //ModStruct ifs_description =
70 //{"ifs", "init_ifs", "draw_ifs", "release_ifs",
71 // "init_ifs", "init_ifs", (char *) NULL, &ifs_opts,
72 // 1000, 1, 1, 1, 64, 1.0, "",
73 // "Shows a modified iterated function system", 0, NULL};
74 
75 //#endif
76 
77 #include "goom_tools.h"
78 
79 
80 #define LRAND() ((long) (RAND() & 0x7fffffff))
81 #define NRAND(n) ((int) (LRAND() % (n)))
82 #define MAXRAND (2147483648.0) /* unsigned 1<<31 as a * *
83  * * float */
84 
85 /*****************************************************/
86 
87 using DBL = double;
88 using F_PT = float;
89 
90 /*****************************************************/
91 
92 #define FIX 12
93 #define UNIT ( 1<<FIX )
94 #define MAX_SIMI 6
95 
96 #define MAX_DEPTH_2 10
97 #define MAX_DEPTH_3 6
98 #define MAX_DEPTH_4 4
99 #define MAX_DEPTH_5 2
100 
101 /* PREVIOUS VALUE
102 #define MAX_SIMI 6
103 
104 * settings for a PC 120Mhz... *
105 #define MAX_DEPTH_2 10
106 #define MAX_DEPTH_3 6
107 #define MAX_DEPTH_4 4
108 #define MAX_DEPTH_5 3
109 */
110 
111 #define DBL_To_F_PT(x) (F_PT)( (DBL)(UNIT)*(x) )
112 
113 using SIMI = struct Similitude_Struct;
114 using FRACTAL = struct Fractal_Struct;
115 
116 struct Similitude_Struct
117 {
118 
123  F_PT m_fR, m_fR2;
124 };
125 
126 
127 struct Fractal_Struct
128 {
129 
130  int m_nbSimi;
136  int m_curPt, m_maxPt;
137 
139 // Pixmap dbuf;
140 // GC dbuf_gc;
141 };
142 
143 static FRACTAL *Root = (FRACTAL *) nullptr, *Cur_F;
144 
145 /* Used by the Trace recursive method */
147 static int Cur_Pt;
148 
149 /*****************************************************/
150 
151 static DBL
152 Gauss_Rand (DBL c, DBL A, DBL S)
153 {
154  DBL y = (DBL) LRAND () / MAXRAND;
155  y = A * (1.0 - exp (-y * y * S)) / (1.0 - exp (-S));
156  if (NRAND (2))
157  return (c + y);
158  return (c - y);
159 }
160 
161 static DBL
162 Half_Gauss_Rand (DBL c, DBL A, DBL S)
163 {
164  DBL y = (DBL) LRAND () / MAXRAND;
165  y = A * (1.0 - exp (-y * y * S)) / (1.0 - exp (-S));
166  return (c + y);
167 }
168 
169 static void
170 Random_Simis (FRACTAL * F, SIMI * Cur, int i)
171 {
172  while (i--) {
173  Cur->m_dCx = Gauss_Rand (0.0, .8, 4.0);
174  Cur->m_dCy = Gauss_Rand (0.0, .8, 4.0);
175  Cur->m_dR = Gauss_Rand (F->m_rMean, F->m_drMean, 3.0);
176  Cur->m_dR2 = Half_Gauss_Rand (0.0, F->m_dr2Mean, 2.0);
177  Cur->m_dA = Gauss_Rand (0.0, 360.0, 4.0) * (M_PI / 180.0);
178  Cur->m_dA2 = Gauss_Rand (0.0, 360.0, 4.0) * (M_PI / 180.0);
179  Cur++;
180  }
181 }
182 
183 static void
184 free_ifs_buffers (FRACTAL * Fractal)
185 {
186  if (Fractal->m_buffer1 != nullptr) {
187  (void) free ((void *) Fractal->m_buffer1);
188  Fractal->m_buffer1 = (IFSPoint *) nullptr;
189  }
190  if (Fractal->m_buffer2 != nullptr) {
191  (void) free ((void *) Fractal->m_buffer2);
192  Fractal->m_buffer2 = (IFSPoint *) nullptr;
193  }
194 }
195 
196 
197 static void
198 free_ifs (FRACTAL * Fractal)
199 {
200  free_ifs_buffers (Fractal);
201 }
202 
203 /***************************************************************/
204 
205 void
206 init_ifs (int width, int height)
207 {
208 // printf ("initing ifs\n");
209 
210  if (Root == nullptr) {
211  Root = (FRACTAL *) malloc (sizeof (FRACTAL));
212  if (Root == nullptr)
213  return;
214  Root->m_buffer1 = (IFSPoint *) nullptr;
215  Root->m_buffer2 = (IFSPoint *) nullptr;
216  }
217  FRACTAL *Fractal = Root;
218 
219 // fprintf (stderr,"--ifs freeing ex-buffers\n");
220  free_ifs_buffers (Fractal);
221 // fprintf (stderr,"--ifs ok\n");
222 
223  int i = (NRAND (4)) + 2; /* Number of centers */
224  switch (i) {
225  case 3:
226  Fractal->m_depth = MAX_DEPTH_3;
227  Fractal->m_rMean = .6;
228  Fractal->m_drMean = .4;
229  Fractal->m_dr2Mean = .3;
230  break;
231 
232  case 4:
233  Fractal->m_depth = MAX_DEPTH_4;
234  Fractal->m_rMean = .5;
235  Fractal->m_drMean = .4;
236  Fractal->m_dr2Mean = .3;
237  break;
238 
239  case 5:
240  Fractal->m_depth = MAX_DEPTH_5;
241  Fractal->m_rMean = .5;
242  Fractal->m_drMean = .4;
243  Fractal->m_dr2Mean = .3;
244  break;
245 
246  default:
247  case 2:
248  Fractal->m_depth = MAX_DEPTH_2;
249  Fractal->m_rMean = .7;
250  Fractal->m_drMean = .3;
251  Fractal->m_dr2Mean = .4;
252  break;
253  }
254 // fprintf( stderr, "N=%d\n", i );
255  Fractal->m_nbSimi = i;
256  Fractal->m_maxPt = Fractal->m_nbSimi - 1;
257  for (i = 0; i <= Fractal->m_depth + 2; ++i)
258  Fractal->m_maxPt *= Fractal->m_nbSimi;
259 
260  if ((Fractal->m_buffer1 = (IFSPoint *) calloc (Fractal->m_maxPt,
261  sizeof (IFSPoint))) == nullptr) {
262  free_ifs (Fractal);
263  return;
264  }
265  if ((Fractal->m_buffer2 = (IFSPoint *) calloc (Fractal->m_maxPt,
266  sizeof (IFSPoint))) == nullptr) {
267  free_ifs (Fractal);
268  return;
269  }
270 
271 // printf ("--ifs setting params\n");
272  Fractal->m_speed = 6;
273  Fractal->m_width = width; /* modif by JeKo */
274  Fractal->m_height = height; /* modif by JeKo */
275  Fractal->m_curPt = 0;
276  Fractal->m_count = 0;
277  Fractal->m_lx = (Fractal->m_width - 1) / 2;
278  Fractal->m_ly = (Fractal->m_height - 1) / 2;
279  // Pseudo-random is good enough. Don't need a true random.
280  // NOLINTNEXTLINE(cert-msc30-c,cert-msc50-cpp)
281  Fractal->m_col = rand () % (width * height); /* modif by JeKo */
282 
283  Random_Simis (Fractal, Fractal->m_components, 5 * MAX_SIMI);
284 
285  /*
286  * #ifndef NO_DBUF
287  * if (Fractal->dbuf != None)
288  * XFreePixmap(display, Fractal->dbuf);
289  * Fractal->dbuf = XCreatePixmap(display, window,
290  * Fractal->m_width, Fractal->m_height, 1);
291  * * Allocation checked *
292  * if (Fractal->dbuf != None) {
293  * XGCValues gcv;
294  *
295  * gcv.foreground = 0;
296  * gcv.background = 0;
297  * gcv.graphics_exposures = False;
298  * gcv.function = GXcopy;
299  *
300  * if (Fractal->dbuf_gc != None)
301  * XFreeGC(display, Fractal->dbuf_gc);
302  * if ((Fractal->dbuf_gc = XCreateGC(display, Fractal->dbuf,
303  * GCForeground | GCBackground | GCGraphicsExposures | GCFunction,
304  * &gcv)) == None) {
305  * XFreePixmap(display, Fractal->dbuf);
306  * Fractal->dbuf = None;
307  * } else {
308  * XFillRectangle(display, Fractal->dbuf,
309  * Fractal->dbuf_gc, 0, 0, Fractal->m_width, Fractal->m_height);
310  * XSetBackground(display, gc, MI_BLACK_PIXEL(mi));
311  * XSetFunction(display, gc, GXcopy);
312  * }
313  * }
314  * #endif
315  */
316  // MI_CLEARWINDOW(mi);
317 
318  /* don't want any exposure events from XCopyPlane */
319  // XSetGraphicsExposures(display, gc, False);
320 
321 }
322 
323 
324 /***************************************************************/
325 
326 /* Should be taken care of already... but just in case */
327 #if !defined( __GNUC__ ) && !defined(__cplusplus) && !defined(c_plusplus)
328 #undef inline
329 #define inline /* */
330 #endif
331 static inline void
332 Transform (SIMI * Simi, F_PT xo, F_PT yo, F_PT * x, F_PT * y)
333 {
334  xo = xo - Simi->m_fCx;
335  xo = (xo * Simi->m_fR) / UNIT;
336  yo = yo - Simi->m_fCy;
337  yo = (yo * Simi->m_fR) / UNIT;
338 
339  F_PT xx = xo - Simi->m_fCx;
340  xx = (xx * Simi->m_fR2) / UNIT;
341  F_PT yy = -yo - Simi->m_fCy;
342  yy = (yy * Simi->m_fR2) / UNIT;
343 
344  *x =
345  ((xo * Simi->m_fCt - yo * Simi->m_fSt + xx * Simi->m_fCt2 - yy * Simi->m_fSt2) / UNIT ) + Simi->m_fCx;
346  *y =
347  ((xo * Simi->m_fSt + yo * Simi->m_fCt + xx * Simi->m_fSt2 + yy * Simi->m_fCt2) / UNIT ) + Simi->m_fCy;
348 }
349 
350 /***************************************************************/
351 
352 static void
353 Trace (FRACTAL * F, F_PT xo, F_PT yo)
354 {
355  F_PT x = NAN;
356  F_PT y = NAN;
357 
358  SIMI *Cur = Cur_F->m_components;
359  for (int i = Cur_F->m_nbSimi; i != 0; --i, Cur++) {
360  Transform (Cur, xo, yo, &x, &y);
361 
362  Buf->x = F->m_lx + ((x * F->m_lx) / (UNIT*2) );
363  Buf->y = F->m_ly - ((y * F->m_ly) / (UNIT*2) );
364  Buf++;
365 
366  Cur_Pt++;
367 
368  if (F->m_depth && (((x - xo) / 16) != 0.0F) && (((y - yo) / 16) != 0.0F)) {
369  F->m_depth--;
370  Trace (F, x, y);
371  F->m_depth++;
372  }
373  }
374 }
375 
376 static void
377 Draw_Fractal ( void /* ModeInfo * mi */ )
378 {
379  FRACTAL *F = Root;
380  int i = 0;
381  int j = 0;
382  SIMI *Cur = nullptr;
383  SIMI *Simi = nullptr;
384 
385  for (Cur = F->m_components, i = F->m_nbSimi; i; --i, Cur++) {
386  Cur->m_fCx = DBL_To_F_PT (Cur->m_dCx);
387  Cur->m_fCy = DBL_To_F_PT (Cur->m_dCy);
388 
389  Cur->m_fCt = DBL_To_F_PT (cos (Cur->m_dA));
390  Cur->m_fSt = DBL_To_F_PT (sin (Cur->m_dA));
391  Cur->m_fCt2 = DBL_To_F_PT (cos (Cur->m_dA2));
392  Cur->m_fSt2 = DBL_To_F_PT (sin (Cur->m_dA2));
393 
394  Cur->m_fR = DBL_To_F_PT (Cur->m_dR);
395  Cur->m_fR2 = DBL_To_F_PT (Cur->m_dR2);
396  }
397 
398 
399  Cur_Pt = 0;
400  Cur_F = F;
401  Buf = F->m_buffer2;
402  for (Cur = F->m_components, i = F->m_nbSimi; i; --i, Cur++) {
403  F_PT xo = Cur->m_fCx;
404  F_PT yo = Cur->m_fCy;
405  for (Simi = F->m_components, j = F->m_nbSimi; j; --j, Simi++) {
406  F_PT x = NAN;
407  F_PT y = NAN;
408  if (Simi == Cur)
409  continue;
410  Transform (Simi, xo, yo, &x, &y);
411  Trace (F, x, y);
412  }
413  }
414 
415  /* Erase previous */
416 
417 /* if (F->m_curPt) {
418  XSetForeground(display, gc, MI_BLACK_PIXEL(mi));
419  if (F->dbuf != None) {
420  XSetForeground(display, F->dbuf_gc, 0);
421 */
422  /* XDrawPoints(display, F->dbuf, F->dbuf_gc, F->m_buffer1, F->m_curPt, * * * *
423  * CoordModeOrigin); */
424 /* XFillRectangle(display, F->dbuf, F->dbuf_gc, 0, 0,
425  F->m_width, F->m_height);
426  } else
427  XDrawPoints(display, window, gc, F->m_buffer1, F->m_curPt, CoordModeOrigin);
428  }
429  if (MI_NPIXELS(mi) < 2)
430  XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
431  else
432  XSetForeground(display, gc, MI_PIXEL(mi, F->Col % MI_NPIXELS(mi)));
433  if (Cur_Pt) {
434  if (F->dbuf != None) {
435  XSetForeground(display, F->dbuf_gc, 1);
436  XDrawPoints(display, F->dbuf, F->dbuf_gc, F->m_buffer2, Cur_Pt,
437  CoordModeOrigin);
438  } else
439  XDrawPoints(display, window, gc, F->m_buffer2, Cur_Pt, CoordModeOrigin);
440  }
441  if (F->dbuf != None)
442  XCopyPlane(display, F->dbuf, window, gc, 0, 0, F->m_width, F->m_height, 0, 0, 1);
443 */
444 
445  F->m_curPt = Cur_Pt;
446  Buf = F->m_buffer1;
447  F->m_buffer1 = F->m_buffer2;
448  F->m_buffer2 = Buf;
449 }
450 
451 
453 draw_ifs ( /* ModeInfo * mi */ int *nbPoints)
454 {
455  if (Root == nullptr)
456  return nullptr;
457  FRACTAL *F = Root; // [/*MI_SCREEN(mi)*/0];
458  if (F->m_buffer1 == nullptr)
459  return nullptr;
460 
461  DBL u = (DBL) (F->m_count) * (DBL) (F->m_speed) / 1000.0;
462  DBL uu = u * u;
463  DBL v = 1.0 - u;
464  DBL vv = v * v;
465  DBL u0 = vv * v;
466  DBL u1 = 3.0 * vv * u;
467  DBL u2 = 3.0 * v * uu;
468  DBL u3 = u * uu;
469 
470  SIMI *S = F->m_components;
471  SIMI *S1 = S + F->m_nbSimi;
472  SIMI *S2 = S1 + F->m_nbSimi;
473  SIMI *S3 = S2 + F->m_nbSimi;
474  SIMI *S4 = S3 + F->m_nbSimi;
475 
476  for (int i = F->m_nbSimi; i; --i, S++, S1++, S2++, S3++, S4++) {
477  S->m_dCx = u0 * S1->m_dCx + u1 * S2->m_dCx + u2 * S3->m_dCx + u3 * S4->m_dCx;
478  S->m_dCy = u0 * S1->m_dCy + u1 * S2->m_dCy + u2 * S3->m_dCy + u3 * S4->m_dCy;
479  S->m_dR = u0 * S1->m_dR + u1 * S2->m_dR + u2 * S3->m_dR + u3 * S4->m_dR;
480  S->m_dR2 = u0 * S1->m_dR2 + u1 * S2->m_dR2 + u2 * S3->m_dR2 + u3 * S4->m_dR2;
481  S->m_dA = u0 * S1->m_dA + u1 * S2->m_dA + u2 * S3->m_dA + u3 * S4->m_dA;
482  S->m_dA2 = u0 * S1->m_dA2 + u1 * S2->m_dA2 + u2 * S3->m_dA2 + u3 * S4->m_dA2;
483  }
484 
485  // MI_IS_DRAWN(mi) = True;
486 
487  Draw_Fractal ( /* mi */ );
488 
489  if (F->m_count >= 1000 / F->m_speed) {
490  S = F->m_components;
491  S1 = S + F->m_nbSimi;
492  S2 = S1 + F->m_nbSimi;
493  S3 = S2 + F->m_nbSimi;
494  S4 = S3 + F->m_nbSimi;
495 
496  for (int i = F->m_nbSimi; i; --i, S++, S1++, S2++, S3++, S4++) {
497  S2->m_dCx = 2.0 * S4->m_dCx - S3->m_dCx;
498  S2->m_dCy = 2.0 * S4->m_dCy - S3->m_dCy;
499  S2->m_dR = 2.0 * S4->m_dR - S3->m_dR;
500  S2->m_dR2 = 2.0 * S4->m_dR2 - S3->m_dR2;
501  S2->m_dA = 2.0 * S4->m_dA - S3->m_dA;
502  S2->m_dA2 = 2.0 * S4->m_dA2 - S3->m_dA2;
503 
504  *S1 = *S4;
505  }
506  Random_Simis (F, F->m_components + 3 * F->m_nbSimi, F->m_nbSimi);
507 
508  Random_Simis (F, F->m_components + 4 * F->m_nbSimi, F->m_nbSimi);
509 
510  F->m_count = 0;
511  }
512  else
513  F->m_count++;
514 
515  F->m_col++;
516 
517  /* #1 code added by JeKo */
518  (*nbPoints) = Cur_Pt;
519  return F->m_buffer2;
520  /* #1 end */
521 }
522 
523 
524 /***************************************************************/
525 
526 void
527 release_ifs ()
528 {
529  if (Root != nullptr) {
530  free_ifs(Root);
531  (void) free ((void *) Root);
532  Root = (FRACTAL *) nullptr;
533  }
534 }
535 
536 //#endif /* MODE_ifs */
Fractal_Struct::m_drMean
DBL m_drMean
Definition: ifs.cpp:134
MAX_DEPTH_4
#define MAX_DEPTH_4
Definition: ifs.cpp:97
Fractal_Struct::m_col
int m_col
Definition: ifs.cpp:131
Fractal_Struct
Definition: ifs.cpp:127
Transform
static void Transform(SIMI *Simi, F_PT xo, F_PT yo, F_PT *x, F_PT *y)
Definition: ifs.cpp:331
Cur_Pt
static int Cur_Pt
Definition: ifs.cpp:146
Similitude_Struct::m_dA2
DBL m_dA2
Definition: ifs.cpp:119
MAX_DEPTH_5
#define MAX_DEPTH_5
Definition: ifs.cpp:98
Similitude_Struct::m_dA
DBL m_dA
Definition: ifs.cpp:119
Similitude_Struct::m_dCy
DBL m_dCy
Definition: ifs.cpp:118
Fractal_Struct::m_count
int m_count
Definition: ifs.cpp:132
free_ifs
static void free_ifs(FRACTAL *Fractal)
Definition: ifs.cpp:197
IFSPoint::x
gint32 x
Definition: ifs.h:12
Trace
static void Trace(FRACTAL *F, F_PT xo, F_PT yo)
Definition: ifs.cpp:352
Similitude_Struct::m_fCy
F_PT m_fCy
Definition: ifs.cpp:121
LRAND
#define LRAND()
Definition: ifs.cpp:80
Fractal_Struct::m_buffer2
IFSPoint * m_buffer2
Definition: ifs.cpp:137
draw_ifs
IFSPoint * draw_ifs(int *nbPoints)
Definition: ifs.cpp:452
Fractal_Struct::m_nbSimi
int m_nbSimi
Definition: ifs.cpp:129
Cur_F
static FRACTAL * Cur_F
Definition: ifs.cpp:142
Fractal_Struct::m_depth
int m_depth
Definition: ifs.cpp:131
if
if(query.exec() &&query.next())
Definition: mythplugins/mytharchive/mytharchivehelper/main.cpp:458
NRAND
#define NRAND(n)
Definition: ifs.cpp:81
Random_Simis
static void Random_Simis(FRACTAL *F, SIMI *Cur, int i)
Definition: ifs.cpp:169
M_PI
#define M_PI
Definition: goom_tools.h:5
ifs.h
Root
static FRACTAL * Root
Definition: ifs.cpp:142
Similitude_Struct::m_dCx
DBL m_dCx
Definition: ifs.cpp:118
Similitude_Struct::m_fR2
F_PT m_fR2
Definition: ifs.cpp:122
Fractal_Struct::m_buffer1
IFSPoint * m_buffer1
Definition: ifs.cpp:137
Similitude_Struct
Definition: ifs.cpp:116
Similitude_Struct::m_dR
DBL m_dR
Definition: ifs.cpp:119
Fractal_Struct::m_curPt
int m_curPt
Definition: ifs.cpp:135
Fractal_Struct::m_speed
int m_speed
Definition: ifs.cpp:132
IFSPoint
Definition: ifs.h:11
Fractal_Struct::m_components
SIMI m_components[5 *MAX_SIMI]
Definition: ifs.cpp:130
F_PT
float F_PT
Definition: ifs.cpp:87
Similitude_Struct::m_fSt2
F_PT m_fSt2
Definition: ifs.cpp:120
DBL
double DBL
Definition: ifs.cpp:86
MAX_SIMI
#define MAX_SIMI
Definition: ifs.cpp:93
Similitude_Struct::m_fCx
F_PT m_fCx
Definition: ifs.cpp:121
Similitude_Struct::m_fR
F_PT m_fR
Definition: ifs.cpp:122
Draw_Fractal
static void Draw_Fractal(void)
Definition: ifs.cpp:376
Fractal_Struct::m_height
int m_height
Definition: ifs.cpp:133
Gauss_Rand
static DBL Gauss_Rand(DBL c, DBL A, DBL S)
Definition: ifs.cpp:151
Fractal_Struct::m_maxPt
int m_maxPt
Definition: ifs.cpp:135
Fractal_Struct::m_dr2Mean
DBL m_dr2Mean
Definition: ifs.cpp:134
goom_tools.h
Fractal_Struct::m_width
int m_width
Definition: ifs.cpp:133
DBL_To_F_PT
#define DBL_To_F_PT(x)
Definition: ifs.cpp:110
Similitude_Struct::m_dR2
DBL m_dR2
Definition: ifs.cpp:119
MAX_DEPTH_2
#define MAX_DEPTH_2
Definition: ifs.cpp:95
UNIT
#define UNIT
Definition: ifs.cpp:92
MAXRAND
#define MAXRAND
Definition: ifs.cpp:82
Similitude_Struct::m_fCt2
F_PT m_fCt2
Definition: ifs.cpp:120
Buf
IFSPoint * Buf
Definition: ifs.cpp:145
release_ifs
void release_ifs()
Definition: ifs.cpp:526
MAX_DEPTH_3
#define MAX_DEPTH_3
Definition: ifs.cpp:96
Fractal_Struct::m_ly
int m_ly
Definition: ifs.cpp:133
Similitude_Struct::m_fCt
F_PT m_fCt
Definition: ifs.cpp:120
Fractal_Struct::m_lx
int m_lx
Definition: ifs.cpp:133
Fractal_Struct::m_rMean
DBL m_rMean
Definition: ifs.cpp:134
IFSPoint::y
gint32 y
Definition: ifs.h:12
Similitude_Struct::m_fSt
F_PT m_fSt
Definition: ifs.cpp:120
init_ifs
void init_ifs(int width, int height)
Definition: ifs.cpp:205
Half_Gauss_Rand
static DBL Half_Gauss_Rand(DBL c, DBL A, DBL S)
Definition: ifs.cpp:161
free_ifs_buffers
static void free_ifs_buffers(FRACTAL *Fractal)
Definition: ifs.cpp:183