{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Ch6_fractal fern

# Ch6_fractal fern - Chapter 6 Fractal Fern The fractal fern...

This preview shows pages 1–4. Sign up to view the full content.

Chapter 6 Fractal Fern The fractal fern involves 2-by-2 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 image-processing functions. The exm toolbox also includes fern.jpg , a 768-by-1024 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

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
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 = 0 . 85 0 . 04 - 0 . 04 0 . 85 , b = 0 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.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 8

Ch6_fractal fern - Chapter 6 Fractal Fern The fractal fern...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online