A Brief Look at IFS Representation & Chaos Game

What’s quite fascinating about mathematics is when you can turn equations and numbers into art that looks pleasing to you and I. It helps build a narrative that simple rules somehow have the power to manifest images of infinite complexity. A great example of this would be the construction of self-similar fractals using something called an IFS (Iterated Function System).

What even is an IFS, anyway?

Simply put, it’s a list of (potentially non-linear) functions that iteratively manipulate some data. This is a very broad definition, however, and it may not seem obvious at first how we can use an IFS to our advantage to generate things such as fractals. In order to better explain how it’s used for this purpose, I’ll give an example below:

A Sierpiński triangle generated in console using an IFS and the chaos game.
Barnsley fern using the same method as above. (note: function selection is based on probability for the fern)
Lévy C curve, motion is generated by gradually reducing the denominator of each function until it reaches 2.
Transformation from Dragon curve to Lévy C curve.

The Epitome of Chaos

A question that has always bugged me is how is this even possible. I understand the math, I understand what is going on “under the hood”, but it’s still mind-blowing to see order come from randomness and such simple rules. That’s what makes chaos theory/game so fascinating. Here’s a (broad) question to think about: are these fractals created or discovered? I mean, we invented the system used to represent and display these shapes, but these rules we’re just now discovering have existed long before we realized they were there. And with infinitesimally small variations producing such wildly different results, it would be impossible for anyone to discover every fractal that is hiding within the chaos. It serves as a reminder that our planet is also governed by sets of rules, some of which may be similar to the rules which govern fractals; judging by just how common fractal-like structures appear in nature. Others of which may extend deep into the cosmos, farther than we are able to discover as of now. There’s no telling what else is hiding from us.

Writing about various STEM-related projects that I’m working on.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store