Koch Fractal Project

The Koch Fractal project was a mini project I did during my free time. I wanted to explore being able to generate snowflake shapes and testing what uses it might have in any projects.


The script allows the user to decide which axis the line renderer will line up on. It also gives different shapes to begin generating from, such as a triangle, pentagon, or octagon. Using Bezier curves to smooth out each generation of lines is also an option, but it has a tendency to flicker with more generations. The generate multiplier and lerp amount options in the Inspector will give the user control over how each generation will grow. Then a simple C# rotation script is added on to observe how it looks when its moving.


I quickly found that it a single Koch Fractal prefab became sluggish and memory consuming as I created more generations. Using multiple would have been a waste of resources. Despite that, I plan to further test this project to see if it can be used to randomly generate magic circles for attack sequences.