PROGRAM PITSTOP
Your Sinclair, November 1989

Had enough of hex? Then never fear, because here's that groovy sport
Jonathan Davies with a truly scrumptious fractal program mega-special.

Heavily laden Jiffies continue to tumble through the letter box. Due
to an unforeseen coincidence, most of this month's batch consisted of
fractal programs, so I've turned over a large chunk of Pitstop to that
very subject. In the face of popular demand, I have also designated
this issue a hex- free zone. Normality should return next month though.

Who better to include in a fractal special than the Fractal Farm
itself? I've selected a few of the Farm's highly professional products
which are definitely worth having a go at. Then, of course, a
Mandelbrot program. This is the work of Barry Hunt and Neil Palmer,
presumably taking it in turns to press keys or something.

If you're wondering what to have a crack at writing next, how about
some sound FX for fellow readers to incorporate into their own
programs? Your 48K Machine Code ones would probably benefit the
community most, and those that make the nicest noise, in relation to
their size (a few bytes, hopefully), will be immortalised forever in
print. What an offer, eh? They're dead easy to do too.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

FRACTAL FROLICS
by The Fractal Farm

Possibly the most devastating response to my recent fractal request
came from the appropriately-named Fractal Farm, an outfit consisting
of Thomas Rushton who handles algorithms and Jonathan Scott who does
the coding. They sent in a C90 packed with stuff, a selection of which
is printed below. The first three are pretty short, but the fourth
will take a little effort. And look - no hex!

Chaos
This produces randomly generated fractal patterns, the shapes of which
depend on three numbers which are entered when the program is run.
These should be between -2 and +2. The guys at the Farm recommend
trying phone numbers. For example, 0.01, 0.631 and 0.1433. As with all
fractal programs, it takes ages to run but pretty patterns start
appearing almost straight away.

Crystals
This program demonstrates the growth of a crystal using a highly
scientific technique which I won't go into now, and it shows (it sez
ere) how small imperfections can go on to trigger larger ones. Knock
it in and see what happens.

Fern
A classic example of a naturally occurring fractal is a fern. Each leaf
is a replica of the main plant, and branching off from the stem of the
leaf are lots of even smaller copies. This means that realistic ferns
can be easily drawn on the Speccy, and here's a program to do it.

All you have to do is type in a couple of branch angles (0-90 degrees
would be sensible) and then wait.

Landscapes
This is the longest program, probably because it gives the most
elaborate results. It draws 3D wire-frame landscapes which can be
shaped by altering a range of probabilities.

On running the program, a short menu pops up. Pressing 1 or 2 draws a
landscape (mini or full) and 3 lets you alter the probabilities.
What's happening here is that each x and y value on the grid on which
the landscapes are drawn is assigned a probability - the higher the
value, the more likely a piece of land will appear on it. There are
two screens, one for x values and one for y, which can be swopped
between by pressing X and Y. The cursor keys are used to increase or
decrease the values at each position up to a maximum limit. The amount
of unused probability, as it were, is shown on the right of the screen
- it must all be used up before this section can be left.

Sounds a bit fiddly, I know, but the results are excellent.

The Fractal Farm boys have announced the impending arrival of a second
tape-full, so watch this space. All right, you can stop now.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

MANDELBROT MAGIC
by Barry Hunt & Neil Palmer

Nothing fractal-related would be complete without a good ol'
Mandelbrot Set generator and, out of the heap of excellent ones that
came tumbling in, I deemed this one by Barry Hunt and Neil Palmer to
be the neatest, mainly because of its size (or lack of it).

So what is the Mandelbrot Set then? Er, it's highly mathematical, but
basically it involves iterating the equation x=x+i in the complex
plan, and plotting a point when x fails to tend to infinity. Simple,
eh? The end result is that a weird pattern is generated which, if
examined closely, can be seen to be infinitely complicated.

On running the program you'll be asked to enter a series of numbers.
To plot the whole set, in as much detail as possible, enter the
following numbers.

	a = -2.568
	b = -1.25
	aside = 3.636
	bside = 2.5
	width = 255
	height = 175
	accuracy = 10

The trouble is, the whole thing takes hours to generate. Erm, 11 of
them to be precise. It's worth the wait though, and the author points
out that using Mallard Basic on the +3 reduces this to about three
hours, and a compiled version should do even better still.
Alternatively, you can either reduce the area of the screen that's
filled by the pattern by changing the Width and Height variables, or
simply reduce the accuracy.

This is only the beginning though. By choosing a new starting
co-ordinate (by changing a and b) and viewing a smaller area of the
set (by lowering aside and bside) you can examine parts of it in
detail. The interesting bits are located at co-ordinates around the
edges of the shape. Anywhere else tends to give a blank screen. If you
discover any really nice areas, write the relevant numbers on the back
of a Luncheon Voucher and send them to the usual address. Also, if
anyone feels like writing a Machine Code version, perhaps with a zoom
facility, let me know.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Ta-ra!
Feeling at a loose end as the evenings begin to draw in? Well write a
program then and become a star overnight by either having it printed
in Britain's biggest, brightest (and only) listing section or by
triggering off a hydrogen fusion reaction within yourself to produce
large amounts of helium and electromagnetic radiation. Whatever you
decide, send the results to ... Jonathan Davies, Program Pitstop, YS,
14 Rathbone Place, London W1P 1DE.
