“91974˙CH09˙final” 2012/11/12 9:47 page 305 #1
CHAPTER
9
Fractals: The Geometry of Nature
9.1 Objectives
To introduce functional programming style
To practice writing recursive functions
To introduce grammars and production rules
9.2 Introduction
Take a look at the tree in Figure 9.1. Notice that you could choose any of the major
branches of that tree, cut it off, and it would bear a strong resemblance to the entire tree.
Furthermore, you could cut one of the branches off of that branch and it would resemble
the entire tree. In fact, you could continue to prune the tree down to the size of some small
twigs and you would see that even the twigs ...

Get Python Programming in Context, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.