본문 바로가기

Lesson 27: Fractal tree

English

A tree made of trees

  • Look at a real tree: each branch looks like a small tree, and its branches look like even smaller trees.
  • A shape that is made of smaller copies of itself is a fractal.
  • To draw it, write a function that calls itself: draw the trunk, then draw two smaller trees on top.

Words for this lesson

Word Meaning
fractal a shape made of smaller copies of itself
recursion a function that calls itself
base case when the function stops calling itself
depth how many levels are left

로그인 또는 계정 만들기

IGCSE, A-Level & AP