Triforce Fractal Generator


  • Fuze Team

    This is a cool little maths trick that I found out about a little while ago.

    Rules of the trick:
    The program will plot 3 points (gold) in a triangular shape. These points do not move.
    A moving point (red) is also created.
    A random number (1, 2, or 3) is created. This corresponds to each of the gold points.
    The moving point will move half the way towards the random point.
    The screen is never cleared, so more moving points will show, the longer the program runs.

    How it works:
    The moving point will always move half way towards its destination. So (for example) if the moving point was between the 2 bottom points (and not higher on the screen), and the target was the top dot, the moving point would skip the first half, and place a point in the middle of the triangle. Repeating this with the top point as the target would keep skipping smaller areas.
    In other words, there are some points inside the triangle where it is impossible to get to (while following the set rules).
    When you have this repeating, more and more points that the point can be, will be filled. This means that the points that can't be achieved, become more clear, which shows the pattern better.

    What we can learn from it:
    Fuze was created to teach people to code, and games are a huge part of that. Coding games is really fun!
    But this program demonstrates that Fuze is capable of more than just games, and that cool maths patterns can be programmed as well.
    Also, maths can be fun too!


  • Fuze Team

    Will have to take your word for it that maths can be fun too, but I do love a nice looking Tri-Force Symbol from one of the best game series ever made :)



  • Otherwise known as Sierpinski Triangle ;) I'm also looking forward to revisiting Mandlebrot, Julia, Martin, Lorenz etc. :)


Log in to reply