• home
  • About
  • VFX
  • Digital Art
  • Projects
  • Resume
  • Contact me
Menu

Ethan L. Lupinski

  • home
  • About
  • VFX
  • Digital Art
  • Projects
  • Resume
  • Contact me
koch2.jpg

Koch Fractal Project

March 13, 2018

koch.png
koch2.png
koch3.png
koch.png koch2.png koch3.png

This project was one I tackled in my free time. I wanted to try something different that was outside of the realm of game development, so I chose to experiment with koch snowflake algorithm. I used Unity to build the project in and wrote C# scripts to get the work done.

I created an empty game object and attached a line renderer to it. In the script, I added options to change the shape of the “initiator.” The user would be able to start from a triangle, square, hexagon, heptagon or an octagon. The “initiator” would be the shape the line renderer would take on at run-time. The user also has the option to modify the initator size as well.

The “generate multiplier” and “lerp amount” variables in the inspector offer the user control over how to modify each generation of lines. I then chose to initiate new generations with the “O” and “I” keys. The “O” key would have the next generation would stretch outward. The “I” key would have the next generation stretch inward. I later added a bezier curve option and a “bezier vertex count” variable in order to have control over how much I could smooth out a line. However, I found that on occasion, some of the lines would not line up with other generations. This could be seen in one of the snowflake screencaps above.

Some minor details I added to the project was the ability to choose what axis the line renderer would generate along. I also added a basic rotation script to the game object to have some kind of motion while the generations were being initialized.

In the end, I did learn a lot from this project as I hoped I would. I did learn that my approach was not exactly resource friendly. At the time, my computer had 8GB of memory and I found that the project would quickly eat up my memory as I created more generations. It took me some time to figure out the issue, although I didn’t really know how to resolve it efficiently enough. I hope to someday revisit this project and find a better way to rebuild it and use it for something practical in a future project.

 
← StoryBook AR Forest Explorer →

Latest Posts

Featured
Aug 21, 2021
Time Tails
Aug 21, 2021
Aug 21, 2021
Nov 3, 2020
Android Mobile Portflio
Nov 3, 2020
Nov 3, 2020
Feb 10, 2020
Percussive Repairs
Feb 10, 2020
Feb 10, 2020
May 31, 2019
Beyond Imagination
May 31, 2019
May 31, 2019
Jan 31, 2019
Imagination Heights
Jan 31, 2019
Jan 31, 2019
Dec 29, 2018
Vulkan Project
Dec 29, 2018
Dec 29, 2018
Dec 21, 2018
StoryBook AR
Dec 21, 2018
Dec 21, 2018
Mar 13, 2018
Koch Fractal Project
Mar 13, 2018
Mar 13, 2018
Jan 31, 2018
Forest Explorer
Jan 31, 2018
Jan 31, 2018

Powered by Squarespace