This preview shows pages 1–4. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Chapter 6 Fractal Fern The fractal fern involves 2by2 matrices. The programs fern and finitefern in the exm toolbox produce the Fractal Fern described by Michael Barnsley in Fractals Everywhere [ ? ]. They generate and plot a potentially infinite sequence of random, but carefully choreographed, points in the plane. The command fern runs forever, producing an increasingly dense plot. The command finitefern(n) generates n points and a plot like Figure 6.1. The command finitefern(n,s) shows the generation of the points one at a time. The command F = finitefern(n); generates, but does not plot, n points and returns an array of zeros and ones for use with sparse matrix and imageprocessing functions. The exm toolbox also includes fern.jpg , a 768by1024 color image with half a million points that you can view with a browser or a paint program. You can also view the file with F = imread(fern.png); image(F) Copyright c 2009 Cleve Moler Matlab R is a registered trademark of The MathWorks, Inc. TM August 8, 2009 1 2 Chapter 6. Fractal Fern Figure 6.1. Fractal fern. If you like the image, you might even choose to make it your computer desktop background. However, you should really run fern on your own computer to see the dynamics of the emerging fern in high resolution. The fern is generated by repeated transformations of a point in the plane. Let x be a vector with two components, x 1 and x 2 , representing the point. There are four different transformations, all of them of the form x Ax + b, with different matrices A and vectors b . These are known as affine transformations . The most frequently used transformation has A = . 85 . 04 . 04 0 . 85 , b = 1 . 6 . This transformation shortens and rotates x a little bit, then adds 1 . 6 to its second component. Repeated application of this transformation moves the point up and to the right, heading toward the upper tip of the fern. Every once in a while, one of the other three transformations is picked at random. These transformations move 3 the point into the lower subfern on the right, the lower subfern on the left, or the stem....
View
Full
Document
 Spring '11
 Adams
 Matrices

Click to edit the document details