## Sunday, February 24, 2013

### The Fern

Mathematician Dr. Michael Barnsley, on page 87 of his book, Fractals Everywhere, gives a table containing the coefficients and probabilities for computing the image of a fern using his famous Collage Theorem.
The Collage Theorem consists of two linear equations, ax + by + e, cx + dy + f, four transformations w1, w2, w3, w4, and, as mentioned above, the coefficients and probabilities for computing the image.  Note: In the Scratch code, I name the transformations w1, etc. as subroutines.
The Collage Theorem can compute ANY image. The trick is finding the right coefficients, a, b, c, d, e, and f. Consult his book, Fractals Everywhere, for more information.
Here is a screenshot of the Fern project I recently uploaded to the Scratch website.

The Collage Theorem uses high school algebra but is incredibly powerful at creating images from small pieces of computer code. Again, I explain the Collage Theorem in detail in a free PDF, The Collage Theorem, that can be had for free by sending a request to

## Saturday, February 23, 2013

### An Iconic Image of Deterministic Chaos

The Sierpinski triangle, along with the Mandelbrot set, are two of the iconic images of Fractals and Chaos theory.
The mathematician Michael Barnsley created a theorem called the Collage Theorem that provides the mathematics for playing the 'Chaos Game' (the common source for the Sierpinski Triangle) that will compute ANY image!
Perhaps you've seen the ferns (a soon to be uploaded Scratch project) and other images produced by the Collage Theorem (called Iterated Functions Systems by Barnsley).
Geometrically, the Collage Theorem is the mathematics for creating an affine geometric transformation which is a combination of translations, rotations, and scalings (taught in secondary mathematics). Every image has a unique set of values for the coefficients a, b, c, d, e, and f of the transformation equations. Plug those values into an algorithm like the one in this project and compute the image!
Here is a very short video of the Scratch project.

The Chaos Game is usually presented as a random application of the midpoint theorem, a typical Algebra I topic. In the future I will upload the midpoint formula project as used in playing the Chaos Game. It computes the same image computed in this project.
I have also written a PDF document that contains biographical information about Dr. Barnsley and works through the mathematics used in the project. Send an email to
to request a free copy.

## Tuesday, February 5, 2013

### Projectile Motion in Scratch

The equation of motion for a projectile (like a cannonball) is
This is a quadratic equation of the form y = ax2 + bx with the coefficients a and b as shown in the equation.
Even though the equation graphs as a parabola, projectile motion is considered to be a linear system (not to be confused with the equation of a straight line, y = mx + b).
It’s linear because a small change in the input(s) initial velocity and/or launch angle, produces a small change in the output, that is, the point where the projectile lands.
Deterministic chaos is the study of nonlinear systems. That is, systems where a small change in input can cause a huge change in output. In chaos theory, that is the basis for the Butterfly Effect (see the Lorenz Attractor in Scratch project).

The purpose of this project is to demonstrate the ‘small change in input’ creates a ‘small change in output’ characteristic of linear systems. Watch this short video to see how the Scratch program helps you understand a linear system.
A free pdf file, Projectile Motion in Scratch, explains how the equation of motion is derived and also explains how the Scratch program was coded to make understanding the code as simple as possible.
To obtain a free copy of this file, send an email request to grandadscience@gmail.com.

### Free pdf Files for the Following Topics

One of the goals of this blog is to provide the free pdf files I've written that discuss and explain the mathematics and programming techniques used in my projects uploaded to Scratch.
Six of these files are now available.

Projectile Motion in Scratch

File: The Lorenz Attractor in Scratch

File: Lindenmayer Systems in Scratch

File: The Generalized Polygon in Scratch

File: Koch Snowflake in Scratch

File: The Sine Function in Scratch

Simply send an email request to grandadscience@gmail.com and I will email you any or all of the above files.
The files are free of any copyright restrictions.
The links to the Scratch projects I've uploaded to the Scratch web site are also given below each title.