56static constexpr uint8_t
FIX { 12 };
66{
return static_cast<F_PT>(
static_cast<DBL>(
UNIT) * x ); };
106static constexpr double MAXRAND { 2147483648.0 };
112 y = A * (1.0 - exp (-y * y * S)) / (1.0 - exp (-S));
122 y = A * (1.0 - exp (-y * y * S)) / (1.0 - exp (-S));
129 SIMI * Cur = &simi_set[offset];
168 if (
Root ==
nullptr) {
215 for (i = 0; i <= Fractal->
m_depth + 2; ++i)
283#if !defined( __GNUC__ ) && !defined(__cplusplus) && !defined(c_plusplus)
290 xo = xo - Simi->
m_fCx;
292 yo = yo - Simi->
m_fCy;
324 if (F->
m_depth && (((x - xo) / 16) != 0.0F) && (((y - yo) / 16) != 0.0F)) {
338 SIMI *Simi =
nullptr;
422 DBL u1 = 3.0 * vv * u;
423 DBL u2 = 3.0 * v * uu;
432 for (
int i = F->
m_nbSimi; i; --i, S++, S1++, S2++, S3++, S4++) {
452 for (
int i = F->
m_nbSimi; i; --i, S++, S1++, S2++, S3++, S4++) {
487 if (
Root !=
nullptr) {
489 free ((
void *)
Root);
static void free_ifs(FRACTAL *Fractal)
static void Draw_Fractal(void)
std::array< SIMI, 5 *MAX_SIMI > SimiData
void init_ifs(int width, int height)
static constexpr uint16_t UNIT
static constexpr uint8_t FIX
static constexpr int8_t MAX_DEPTH_4
static constexpr int8_t MAX_DEPTH_2
static constexpr double MAXRAND
static constexpr int8_t MAX_DEPTH_3
static DBL Half_Gauss_Rand(DBL c, DBL A, DBL S)
static F_PT DBL_To_F_PT(DBL x)
static DBL Gauss_Rand(DBL c, DBL A, DBL S)
static constexpr int8_t MAX_DEPTH_5
static void Transform(SIMI *Simi, F_PT xo, F_PT yo, F_PT *x, F_PT *y)
static void free_ifs_buffers(FRACTAL *Fractal)
static void Random_Simis(FRACTAL *F, SimiData &simi_set, int offset, int count)
IFSPoint * draw_ifs(int *nbPoints)
static void Trace(FRACTAL *F, F_PT xo, F_PT yo)
static constexpr size_t MAX_SIMI
Convenience inline random number generator functions.
int MythRandomInt(int min, int max)
generate a uniformly distributed random signed int in the closed interval [min, max].
uint32_t MythRandom()
generate 32 random bits
bool rand_bool(uint32_t chance=2)
return a random bool with P(true) = 1/chance