**Population Dynamics**

The first idea is based on the behaviour of a system of two populations in a predator-prey relationship. If the size of the population of prey increases then there is more food for the predators. If rabbits multiply, there is more food for foxes and so foxes become numerous. Now the rabbits get eaten up, the foxes become hungry and gradually diminish again. This type of periodic change in population size had been observed in nature, and is modelled by mathematical equations, called the Volterra-Lotka equations, named after the two people who, independently, discovered them.
Given the size of the two populations, the equations predict the future population sizes. For most initial conditions the populations exhibit the cyclic behaviour described above, but there is a balance point at which the populations remain stable.

**Iterative Methods**

The second idea in our recipe for the fractals is an iterative method for estimating the solution of an equation.
These methods provide rules, that given a guess at the answer, will find an even better guess. This better guess can then be plugged back into the rule to get an even better answer. We can continue this way until we get the required level of accuracy.

**The Equations**

In their book "The Beauty of Fractals", Peitgen and Richter suggest an iterative method that is a combination of two discrete one-step methods, Euler's method and Heun's method. They provide a composite formula with two constants, p and h. If p=0 we have Euler's method, while if p=h then we have Heun's method. The interesting things happen when other values of p and h are chosen.

The default settings in the fractal explorer are h=0.739 and p=0.739. This gives a fractal with a "wiggly line" attractor, a nine-point cyclic attractor and a single unstable point at (1,1).

The calculate button will calculate the fractal plot using the values from the table of settings. For each point on the graph
the x and y coordinates are plugged into the iterative equation, which gives a sequence of new points called an orbit.

If x or y become negative, or become greater than the bailout value, the orbit escapes and the starting point is coloured yellow.

If the orbit does not escape the starting point is coloured dark red, and if the final point of the orbit is on the graph this will be coloured blue.

The Redraw button will re-display the previously calculated fractal. It can be used to clear any orbit traces or to change the display settings, "End Points" and "Escape Speed" without the need to re-calculate the underlying plot.

A checkbox allows you to view the end points of every non-escaping orbit. These points will approximate to the attractors. The greater the number of iterations the nearer to the attractors the end points are likely to be.

If the checkbox, "Show escape speed", is checked then the brightness of the yellow colour depends on the number of iterations before the orbit of the point escapes. The lighter the colour the more iterations are needed before the orbit escapes.

The Orbit button will draw lines showing the orbit of the point (x,y) entered in the edit boxes.

If "Show last orbit points" is checked, then lines will not be drawn. Instead the last points
will be coloured green.

The orbit can be cleared using the Redraw button.

An orbit can also be generated by clicking a point on the graph. This point will be used as the start of an orbit.

Back to Top...Number of iterations | The number of iteration that are to be carried out before deciding that the orbit from a point remains non-zero and less than the bailout figure. |

Minimum x |
The value at the lefthand end of the x-axis. It must not be negative. By changing the minimum and maximum values, it is possible to zoom in on any part of the graph. After changing the ends of the axes the fractal must be calculated again. |

Maximum x | The value at the right hand end of the x-axis. Must be larger than the minimum x value. |

Minimum y | The value at the bottom of the y-axis, which must not be negative. |

Maximum y | The value at the top of the y-axis. Must be larger than the minimum y value. |

Bailout | The iteration for the current point on the graph is stopped if either x or y exceed this value. The iteration is also stopped if either x or y become negative. |

p-factor | The Newton factor. See the Mathematics section for details. |

h-factor | The Heun factor. See the Mathematics section. |

The equations to model the population dynamics of a predator-prey situation are

where,

- x is the number of prey
- y is the number of some predator
- dx/dt and dy/dt represent the growth rates of the two populations over time
- t represents time
- α, β, γ and δ are parameters describing the interaction of the two species

The iterative method proposed by Peitgen and Richter in their book "The Beauty of Fractals"

newX = x + h/2( f(x,y) + f(x+pf(x,y), y+pg(x,y)))

newY = y + h/2( g(x,y) + g(x+pf(x,y), y+pg(x,y)))

where

f(x,y) = αx – βxy

g(x,y) = –γy + δxy

For simplicity we can choose α=β=γ=δ=1