Go to the documentation of this file.
48 #define PROGCLASS "IFS"
50 #define HACK_INIT init_ifs
51 #define HACK_DRAW draw_ifs
53 #define ifs_opts xlockmore_opts
55 #define DEFAULTS "*delay: 20000 \n" \
82 #define LRAND() ((long) (RAND() & 0x7fffffff))
83 #define NRAND(n) ((int) (LRAND() % (n)))
84 #define MAXRAND (2147483648.0)
95 #define UNIT ( 1<<FIX )
98 #define MAX_DEPTH_2 10
100 #define MAX_DEPTH_4 4
101 #define MAX_DEPTH_5 2
113 #define DBL_To_F_PT(x) (F_PT)( (DBL)(UNIT)*(x) )
128 using SimiData = std::array<SIMI,5 * MAX_SIMI>;
158 y = A * (1.0 - exp (-y * y * S)) / (1.0 - exp (-S));
168 y = A * (1.0 - exp (-y * y * S)) / (1.0 - exp (-S));
175 SIMI * Cur = &simi_set[offset];
191 (void) free ((
void *) Fractal->
m_buffer1);
195 (void) free ((
void *) Fractal->
m_buffer2);
214 if (
Root ==
nullptr) {
227 int i = (
NRAND (4)) + 2;
261 for (i = 0; i <= Fractal->
m_depth + 2; ++i)
329 #if !defined( __GNUC__ ) && !defined(__cplusplus) && !defined(c_plusplus)
336 xo = xo - Simi->
m_fCx;
338 yo = yo - Simi->
m_fCy;
370 if (F->
m_depth && (((x - xo) / 16) != 0.0F) && (((y - yo) / 16) != 0.0F)) {
384 SIMI *Simi =
nullptr;
468 DBL u1 = 3.0 * vv * u;
469 DBL u2 = 3.0 * v * uu;
478 for (
int i = F->
m_nbSimi; i; --i, S++, S1++, S2++, S3++, S4++) {
498 for (
int i = F->
m_nbSimi; i; --i, S++, S1++, S2++, S3++, S4++) {
531 if (
Root !=
nullptr) {
533 (void) free ((
void *)
Root);
static void Transform(SIMI *Simi, F_PT xo, F_PT yo, F_PT *x, F_PT *y)
static void Random_Simis(FRACTAL *F, SimiData &simi_set, int offset, int count)
std::array< SIMI, 5 *MAX_SIMI > SimiData
static void free_ifs(FRACTAL *Fractal)
static void Trace(FRACTAL *F, F_PT xo, F_PT yo)
IFSPoint * draw_ifs(int *nbPoints)
if(query.exec() &&query.next())
static void Draw_Fractal(void)
static DBL Gauss_Rand(DBL c, DBL A, DBL S)
void init_ifs(int width, int height)
static DBL Half_Gauss_Rand(DBL c, DBL A, DBL S)
static void free_ifs_buffers(FRACTAL *Fractal)