Welcome to Fractal Forums

Fractal Software => Programming => Topic started by: David Makin on January 19, 2012, 12:31:29 PM




Title: Iterations or time for Chaos Game/Flame fractals
Post by: David Makin on January 19, 2012, 12:31:29 PM
Hi all,

In another thread someone asked why their flame was rendering differently at different resolutions, generally this issue is down to the need to change the number of iterations under change of resolution and/or magnification.
I think the topic's probably been covered before, but anyway in my 2D wip IFS formula for UF (the RIFSbeta one that allows chaos game, deterministic or escape-time rendering) I wrote it so that for the chaos game renders it could be set to auto-magically adjust the iterations used based on the resolution/magnification and the fractal dimension.
The method is:

Code:
Original width w (pixels)
Original height h (pixels)
Original magnification m

Fractal dimension D

New width a (pixels)
New height b (pixels)
New magnification n

Need to scale iterations (or time) by (sqrt((a*b)/(w*h))*n/m)^D

Of course since flames generally have non-linear components it's not so easy to analytically get a value for the fractal dimension but even so one can use an educated guess for D and still apply the above formula to get some idea of how much the iteration count (or time) needs to change to ge the same image under changes in resolution and/or magnification.