Fractal generator

This project creates two types of fractals.

I don't really know their names, but one looks like a triforce from the Legend of Zelda and another one looks like a tree.

https://snap.berkeley.edu/...

I'm probably going to add more fractals.

The one that isn't the tree is called a Sierpinski triangle. The linked Wikipedia article shows several ways to generate it, not including your way! That's very clever.

The picture is much more visible if you set the pen size to 2 before drawing it.

By the way, you can simplify the procedure for choosing which to draw:
fractal%20script%20pic

Looking through your code I got very confused as to why there were blocks with empty definitions, but then I realized they were inline comments.
The tree is a bit slow with all the clones running at the higher depths. I would rather do recursion like you did with Sierpinski's triangle.
And for a suggestion on the next fractal, the Koch snowflake perhaps?

1 Like

I know, but I use the if-else statement to check if the player typed it wrong. Although now that I think about it, checking if the player typed something else isn't really necessary, because the project wouldn't do anything anyway.

Nice! I love the use of the pen space costume for the Triangle!

The triforce one is called the Sierpiński triangle.