I could tell you so much about this project... so first thing's first: Use turbo mode (!), space bar to toggle between light and dark mode, "o" to toggle the outline. Use your mouse to rotate and change size. Scroll down for the interesting part. ___ Math is beautiful. It shows itself visually in fractals of all kinds. I decided to share the classic chaos game fractals. The math is fairly simple. You have a polygon, let's say: A triangle! You have a point anywhere within this triangle. It follows an easy set of rules: 1. pick any corner at random 2. move towards that corner, but only half the distance 3. Repeat. Trace the point and you will have a beautiful fractal (you could zoom in indefinitely, in theory), called the Sierpinski triangle. I made a different project about this one. Try finding the Sierpinski triangle in this project! Now apply this logic to different polygons. No matter how many sides, if you choose a corner at random but only move a certain fraction of the path towards that corner, it could create a fractal, if you use the right fraction. I set up the fractions in the script (see list: "r_values"), feel free to vary or change the rules. Who knows... maybe you might find new fractals or patterns of your own?
Had a lot of fun making this myself. All the math and the thumbnail images are from https://en.wikipedia.org/wiki/Chaos_game (29.09.2025) Surely worth checking it out yourself! It performs faster here: https://turbowarp.org/1222540188/fullscreen?turbo