A magazine where the digital world meets the real world.
On the web
- Browse by date
- Browse by topic
- Enter the maze
- Get our RSS feed
- Follow us on Twitter
- Resources for teachers
What is cs4fn?
- About us
- Contact us
- Privacy and cookies
- Copyright and contributions
- Links to other fun sites
- Complete our questionnaire and get a free magic download
The Fractal Casino Royale
Casino Royale: a new Bond and a new title sequence. Gone are the silhouettes of naked women of all the previous films. After all it would hardly be appropriate. Bond falls in love. But what replaces them? A poker theme for the gambling addicted modern day? Well yes: it is a film about a card game after all. Look more closely though and you will see it's computer science that's replaced the women: fractal imagery.
Look carefully at the clubs as they expand. Each leaf buds off a new smaller club, which then does the same again, creating an ever more intricate pattern. It is a fractal image: an image that is self-similar on smaller and smaller scales. It turns out that natural processes such as the way trees and ferns grow can be modelled mathematically in the same way - break off the frond of a fern and it looks very much like the original only smaller. That means that fractals are a very good way to quickly create realistic computer-generated images of plants. Fractals have also been suggested as a rival to jpeg for compressing images, though it never really took off. Known as fractal compression, the idea was to look for fractal self-similarity in images and then store the rules for creating the fractals rather than all the detail of the original image.
Fractal images are very easy to generate using a process called recursion. It's a way of problem solving (and programming) where a problem is broken into smaller versions of the same problem. These smaller but similar problems can then be solved in the same way. Eventually the problem is broken into a problem so small and trivial the answer is obvious.
The self-similar nature of the ever smaller problems is the same as the self-similar nature of the ever smaller fractal images. That means the rules to generate fractal images are very similar to the computer programs that solve problems using recursion.
Interested in generating your own fractal images? You can do it using GeomLab. It's a free, just for fun, package that allows you to draw pictures using recursive programming - so fractals are quite easy to do once you have mastered the basics. Here is a quick GeomLab recursive drawing similar to the one in bond intro. Read on, to see how to create a series of increasingly fractal versions, or maybe create a better version of your own that buds off in all directions