# New design!

Posted on Sat 05 November 2016 in misc

Hey, new design! It's Flex in purple.

The logo is way more interresting though.
I've had a big triangle on xomg.net for some time,
but it's a nice logo too.

If you can't see it, you probably need to allow JavaScript here.

It's a Sierpiński triangle rendered live in a canvas right there, at 10 FPS so it doesn't melt your CPU.

The method is also very interresting:

The most common method is to draw a triangle and then lots of smaller triangles
until it's small enough to look good. It's pretty slow but produce
an accurate image and a known number of triangles.

Here I'm using the chaos game, I can barely comprehend how it works but it just is amazing.

Basic algorithm (mostly from Wikipedia):

- choose 3 outer points for your triangle
- pick any point inside the triangle make that your current position
- each frame,
- pick one of the 3 vertex
- move halfway to that vertex and draw a point

That's it.

This implementation keeps and updates a list of points that each live for a few seconds.
A point is born pink, and as it gets older it goes to dark blue then to black.

For this logo, 100 points are created 10 times per second and 4000 are kept on screen at any time.

Fun fact: After t seconds, there are (maybe, i'm not great at math)
`(3**40)**t`

possible triangles. (that's huge, even after 1s)

This logo really is unique.