Snap Projects, March 12, 2012, Cardinal Forest Elementary School
Snap website
Snap is available online - about Snap.
back to more Snap! projects
- Triangle Fractal in Snap! with Recursion.
- Create a new block "triangleFractal" with two input variables. Choose "Motion" category (blue) and type "triangleFractal" for the name of our new block.
- The triangle fractal can start drawing at x=-150, y=0.
- At level=1, all that is done is to move the length of side. Here a line of 300 is drawn.
- At level=2, you begin to see the fractal shape. Each move is 1/3 of 300 = 100.
- At level=3, each of the line segments from level=2 has a fractal on it
- The higher we start level, the smaller the fractals will get.
- Starting at level=5 has tiny fractals.
- Here is the block code for this fractal. There are 4 recursive calls to itself.
- Here's a fractal snowflake - the Koch snowflake - made with 3 fractals together.
- Try to make this square fractal.
- Again, starting the fractal with a higher level gives a more detailed fractal.