I think fractals are really cool. Their algorithms are often fairly simple as well. Perfect for my first hackathon!
Uses chaos game / chaos theory to build fractal structures. When applied in the right way, and if you have a bit of creativity, it creates Christmas trees.
A great article about programming it
I used Rust and Piston2d to create this. It's a fairly simple algorithm; just finding a point between two other points.
The math behind the various colours was a bit difficult to get how I wanted, but ultimately I figured it out.
There are definitely some things that could be improved, and there are some feature's I'd like to add, but overall I'm happy with how it turned out
This is my first hackathon, so I didn't pick something super challenging. Because of this, I didn't learn any specific skills. This was still good practice in math on a cartesian plane, algorithms, and project management
I'm looking at adding a lot of new features. Those include, but are not limited to, UI, presets, and algorithm changes.
You can use 10 different fractals at a time. Use the controls below to define and manage them.
The program takes 4 arguments in order.
- Window width
- Window height
- Iterations for each fractal
- Opacity for every point
For example, recommended settings: cargo run 500 500 100000 0.01
- Number keys -> Change fractal slot
- Enter -> Generate selected fractal
- Up / Down -> Increase or decrease jump size
- Space -> Sets the optimal jump size for the fractal
- C -> Clear current fractal
- Comma -> Change vertex visibility
- Period -> Change fractal visibility
- Left click -> Add vertex on cursor
- Right click -> Remove vertex on cursor
You can also interact with the bars on top to change slot and jump size
Me creating a Christmas tree. This is by no means the only thing you can create using this.
