diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-05-28 17:35:46 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-05-28 17:43:12 +0200 |
commit | d2b38b16b1c416e160f5442cbcef64d1dd97f5f5 (patch) | |
tree | cb8bd9f2b41dbcde20ff7fa0364ba21d80830e02 /flam3.c | |
parent | eacf2017413f590e69e841480ae47a9ebdc769cd (diff) | |
download | pucket-d2b38b16b1c416e160f5442cbcef64d1dd97f5f5.tar.gz pucket-d2b38b16b1c416e160f5442cbcef64d1dd97f5f5.tar.bz2 pucket-d2b38b16b1c416e160f5442cbcef64d1dd97f5f5.zip |
random: Remove symmetry bias
Diffstat (limited to 'flam3.c')
-rw-r--r-- | flam3.c | 23 |
1 files changed, 2 insertions, 21 deletions
@@ -1320,34 +1320,15 @@ static int compare_xforms(const void *av, const void *bv) { } /* sym=2 or more means rotational - sym=1 means identity, ie no symmetry - sym=0 means pick a random symmetry (maybe none) + sym=1 and sym=0 means identity, ie no symmetry sym=-1 means bilateral (reflection) sym=-2 or less means rotational and reflective */ -void flam3_add_symmetry(flam3_genome *cp, int sym, randctx * const rc) { +void flam3_add_symmetry(flam3_genome *cp, int sym) { int i, j, k; double a; int result = 0; - if (0 == sym) { - static int sym_distrib[] = { - -4, -3, - -2, -2, -2, - -1, -1, -1, - 2, 2, 2, - 3, 3, - 4, 4, - }; - if (rand_bool(rc)) { - sym = rand_distrib(rc, sym_distrib); - } else if (rand_mod(rc, 32)) { - sym = rand_mod(rc, 13)-6; - } else { - sym = rand_mod(rc, 51)-25; - } - } - if (1 == sym || 0 == sym) return; cp->symmetry = sym; |