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