Just click on the Green flag. When asked for the depth of the design enter a number between 0 and 7.
In any graphical recursion, there is a basic shape which is redrawn during recursive calls. The recursive procedure decides where and how it is redrawn. In this recursion: - The basic shape is an upright equilateral triangle, - In every recursive call each upright triangle is filled with 3 smaller upright equilateral triangles. It is efficient to simply draw the central upside-down triangle by connecting the mid-points of each edge. Our recursive procedure will draw the central upside-down triangle and it will recurse by going to each of the 3 sub-triangles.