This is an IFS viewer for pico-8

Hit Z to stop iteration if the view hasn't converged,

or to start iterating with new parameters if it has.

Jump into the src and edit the function for different visuals!

Feel free to remix, this is a commented extension of this #tweetjam snippet with nicer visuals.

Glad folks seem to like it!

At the moment I dont have plans to continue extending it as it's taken enough of my time away from work recently, but the src is short and sweet if you want to tweak it for your own purposes!

wikipedia is a good start but the algorithm in particular is "sort of" like the "fractal flame" algorithm.

given some interesting function f(x,y)->x1,y1 pseudocode: for as many random points (x,y) as possible for several iterations x,y = f(x,y) increment pixel at x,y |

There's more you can do to make things look better when you're rendering in RGB (log-space density, multiple colours, etc) but for pico8 all I did was clamp the pixel increments so they dont loop around.

Here the function used is a combination of rotation and scaling around the origin, sinusoidal offsetting, and mirroring over x=y (with about 6 input parameters that affect the scaling of effects, inputs, and outputs).

You can pick whatever function you like, and your results are basically contingent on that function and its control parameters!

Just dive into the code and start reading; it's only 60 lines or so and its got comments :)

Have fun!

[Please log in to post a comment]