From the course: Python: Recursion
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
H-tree fractal using Python Turtle graphics - Python Tutorial
From the course: Python: Recursion
H-tree fractal using Python Turtle graphics
- [Tutor] We are now going to take a look at some of the more creative and playful uses of recursion. These are the kinds of things that many people find intrinsically fascinating but they also help to deepen your understanding of recursion and also to develop this aspect of your algorithmic thinking skills. The first example is a use of recursion to draw a fractal pattern called an H-Tree Ftactal. A very informal definition of a fractal. is a repeating pattern, which appears similar at different levels of magnification, so a fanley is a very good example of this. We're going to be looking at a thing called the H tree fractal which is sometimes known as the rugby post fractal. So this is level zero, the first no recursion just the kind of base case of the fractal. And then we recursively add rugby posts or H characters H shapes to the corners and we keep doing so as the pattern…