Labs / Computer Science
Recursion
A recursive shape is defined in terms of smaller copies of itself. Pick a fractal, drag the depth slider, and watch the same rule apply again and again — each level drawn from tinier versions of the whole. Leave “grow level by level” on to see the recursion actually unfold, with the newest frontier picked out in orange.
depth 0 / 81 branches
What to try
- Bump the tree's depth up one step at a time. How many new branches appear each time — and why does the count roughly double?
- The Koch snowflake's outline gets longer at every level. Could its perimeter keep growing forever while the shape stays inside a small circle?
- Set the branch angle near 90° and then near 5°. What real plants do the extremes remind you of?
- Drop the length ratio to 0.4, then raise it toward 0.85. Where does the tree stop looking like a tree, and what does that say about the base case?
- In the Sierpinski triangle, every solid triangle hides three smaller ones. If you could zoom in forever, would you ever reach a piece that is not a triangle?