FRACTALS PROGRAM IN GfA BASIC
=============================
By Ian Connor
(Version 3.1 September 1989)
Not another Fractal program you say, Well Yes.. but wait, take a
look at this one because it will make most of the others obsolete.
There are several fractal programs available including a couple of
commercial offerings. Probably the best of these is GST FRACTALS,
however, all fail in various areas because the programmers do not
have a sound understanding of Fractal curves and what is needed in
a program to fully study and appreciate them.
I have written many fractal programs over the years ranging from
8 bit basic programs to pascal, to Machine language. Speed was
always the main driving force and with the 8 bit Atari we ended
up with what we think is probably the fastest Mandelbrot program
around for those machines.
With the arrival of the ST we have been going through the same
process with versions in ST Basic, Megamax C , Alcyon C, Dbasic
and now GfA basic.
We Have found that compiled GfA is almost as fast as C but allows
faster development and is easier to use.
Back to the subject, One of the most needed features missing on
other programs was the ability to enter Real & Imaginary co-
ordinates and to have these available for viewing in the program
and SAVED as part of a file.
Also, most are only able to produce one type of curve or suffer
from scaling problems and lack of versatility.
We are not a fan of some of the more recent trends where some
programs do not calculate all screen points! This program does
calculate ALL points and uses other tricks to speed execution
and cut time wastage as you will soon notice.
With this project I have tried to produce a very versatile
program capable of being used by both beginners and
seasoned Fractalists (is that a word?). I think we have suceeded!
PROGRAM FEATURES
================
* Optimum performance iteration loop for maximum speed.
* A choice of 4 curves available for a wide variety of results.
* The ability to Zoom in or out on any of the fractals.
* Manual entry of parameters if required.
* A Preview mode to quickly calculate and view an area.
* All program features available in full screen OR preview mode.
* Recontour and Histograms for optimum color banding.
* Screen saves with parameters in Full screen or preview modes.
* Degas screen save without parameters & with a grey border.
* Calculations can be interupted before completion if required.
* Recall of up to 9 previous screens complete with parameters.
* Choice of 7 preset color palettes & palette editor.
* Movie mode to produce/play up to 100 preview sized frames.
New features/changes since version 1.7
* Setcolor (alter the colors of pic and save palette with pic)
* Autozoom allows destination co-ordinates to be entered in movie
mode. Program then smoothly zooms/pans frame by frame to the
new co-ordinates. Also now has joystick nudge (If an autozoom is
drifting off the desired path or if you wish to nudge the preset
path towards another direction) push & hold joystick in the
desired direction at end of each frame.
* Parameters can now be set as center co-ordinates or side
co-ordinates. Also pic size can be set as a side value or
as a magnification value.
* Recontour & Histogram now available in full screen mode
on a 520ST (special effect options also available)
* Drive select options.
* Old file overwrite bug corrected.
* File extenders now properly set by program.
* Should run from hard disk including title screen!
* Joystick scroll (PAN COMPLETED FRACTAL WITH JOYSTICK !!!!)
* Improved memory mamagement.
* Window title line reports more information.
Changes since version 2.3
* Joystick pan feature now updates iteration data buffer live! This
means Recontour & histogram data is updated with each pan scan line.
Zoomframe bug on old pics loaded then zoomed is corrected.
Minor histogram improvements.
Changes since version 2.6
* Improved (GFA 3) floating point maths precision
* Color palette rotation feature added
* Option to automatically recontour completed fractals
* screen flip on Play Movie for smoother frame animation
GETTING STARTED
===============
IMPORTANT NOTE:- Please do not add any accessories to this disk
as they may not operate correctly or interfere with the operation
of this program. This is because this program uses almost all of
available memory.
To become familiar with the features and operation of the
program try this:-
With the program loaded and the title screen cleared to an
empty screen.
Select Preview from the Options menu, Select Calculate from the
options menu. (This will draw the complete mandelbrot set
in the upper left of the screen (25 seconds)).
Plug in a joystick and move it in any of the 4 main directions,
note how the fractal moves one pixel or scan line and a new line
is calculated. Use this feature to position or center your
fractal. (will work in full screen mode also!)
Pick an area you'd like to zoom in on and then Select Zoom from
the Options menu.
Size a small zoom rectangle by pressing and holding down the
left mouse button and dragging the mouse to the right and down.
Release the mouse button and position the rectangle over the
desired zoom area and press the mouse button again to set.
Then, select Calculate from the menu again to calculate and
plot the new area.
Continue the same process until you find an interesting area.
Then to produce a full screen, click on Preview again to toggle
this option off.
Then Select Calculate and a full screen plot will be done.
When the screen is finished, experiment with - Recontour,
Histogram, Screens, Color Palettes and joystick pans.
Save your picture if you wish. Try loading some of the file
screens on this disk or load and Play a Movie. HAVE FUN!
INFORMATION ON GENERAL PROGRAM OPERATION
========================================
**SCREEN SAVES
All parameters are saved in the picture files including the fractal
type, screen mode, maximum iteration level, Fractal co-ordinates and
side value etc. This will enable you to re-load a picture at any
time and continue zooming etc. (Latest version also saves the color
palette.)
**ZOOMING
All curves can be zoomed including those interupted before completion.
Zooming IN is easy, select Zoom from the menu and size & position a
new zoom window rectangle. When happy with zoom frame size and position
select CALCULATE to plot the new area.
NOTE ( You must be in preview mode to Zoom OUT.)
Size your Zoom rectangle to a size larger than the preview frame and
position over the preview frame,then select CALCULATE.. from the menu.
An automatic zoom in or out is now available in movie mode. This
enables the user to automatically pan to a new set of co-ordinates
while at the same time zooming in or out of the frame.
**MIN VALUES (eg: Min .005)
These values are used in the Chaos curves only. Experiment to achieve
different results.
**RE-CONTOUR
During the calculation and plotting of a fractal, the program has no
way of knowing the maximum and minimum iteration values it will
encounter, and so a quick color routine is used to set the color of
a screen point. This is set to use a new color roughly every third
iteration. Once a Fractal is complete, re contour calculates the
lowest and highest iteration and divides the available colors evenly
into this band, then re plots the Fractal data.
**HISTOGRAM
Provides you with a graph of the frequency of iterations calculated
and allows you to adjust the allocation of colors. Position the
mouse pointer on the color bar and press the left or right mouse
buttons to change the size or position of each color block.
**MAKE/PLAY MOVIE
Available only in preview mode. Load and play one of the Fractal
movies on the disk. Press and hold the mouse or press any key to
interupt play. Make your own movies.
**PARAMETERS
Used for manual input of parameters if required.
HINT:- Try increasing the iteration limit as you zoom in , this
will slow the program down but produce more interesting and accurate
results. In the curves that use the P and Q values, try different
values for interesting results.
NOTE(2) :- The joystick nudge feature available in movie autozoom mode
will work in all 8 stick directions.
MENU FUNCTION DETAILS
=====================
OPTIONS
Julia set Sets the program to calculate Julia type curves.
Mandelbrot Sets the program to calculate Mandelbrot curves.
Chaos(1) Sets the program to calculate and display the
effects of "Chaotic attractors"
Chaos(2) Slight variation on above giving a different result.
Zoom Zoom in or out on any frame (see hints above)
CALCULATE Begins the calculation and plotting of the selected
curve type.
Preview A very useful feature! With this mode selected, the
program calculates & plots a small version of the
full screen in the top left part of the window.
Saves a great deal of time when you are hunting for
an interesting area. To get a full sized frame of the
preview pic, toggle Preview off then select CALCULATE.
You must be in preview mode to activate the Movie
functions.
Parameters Shows the real & imaginary co-ordinates for the
curently displayed frame. (either as center or edge)
Also shows side or size of set and the iteration level
presently being used (Max iterations 2000)
You are also able to manually enter parameters if
desired.
Min .05 Through to .005, .0005, & .00005 Active only when
calculating Chaotic attractor curves. Basicly this
sets the lowest value the iteration loop value will be
allowed to drop to before an exit from the loop.
Quit Option to exit to desktop.
VIEW
Sample Julia Calculates a pre programmed Julia set frame.
Sample Mandel As above for the Mandelbrot set.
Sample Chaos 1 As above for Chaotic attractors.
Sample Chaos 2 As above for different results.
Make movie Activated in preview mode only. A huge
and powerful function. With 1 meg or more
you can create up to 100 preview sized frames
and save them to disk for later playback.
Smooth steps between framed can be obtained
using Auto zoom.
NOTE:- When using autozoom, it is recommended
that you zoom in or out by no more than say 15%
from one frame to the next. E.G. to zoom in,
set at no more than say 85%
Play movie Play a movie resident in memory or loaded
from disk. These movie files can get large,
50 frames uses around 90K of disk space.
Movie speed 3 movie frame playing speeds are available.
Screens Allows up to the last 9 screens calculated
to be displayed (also retains all parameter
and curve type information). Very useful
for backtracking out of a series of zooms.
Zoom or save any screen at any time.
CARE:- Iteration count array only retains
the information for the LAST screen calculated.
(array data is used for re contour & Histograms)
Re-contour Calculates the lowest and highest iteration
counts for the current screen and divides
colors between that band and replots data to
screen. Also allows special effects.(If not
happy with results, select Screens, go back one,
then forward to current screen to restore it.)
Histogram Gives you a graph of the frequency of points at
various iteration bands. Other iteration info
is also displayed. Using the left & right mouse
buttons, put the pointer on the color bar below
the graph and press to alter band widths.
(Great feature eh) Selecting the replot button
will replot the data to screen using the new
color bands. Special effects are also available.
FILE
Load file Loads a fractal file into memory complete with
parameters used to calculate the file. Can be
zoomed. (Use "Parameters" to show parameters)
Save file Saves currently displayed fractal to disk complete
with parameters used to calculate picture.
Delete Can be used to delete any file type.
Autosave For "walk away operation" File is autonamed and
saved to disk when calculation of set is complete.
Save Degas Saves contents of window only (no parameters) as
a Degas file complete with grey border.
Load movie Loads a movie frame sequence into memory.
Save movie Saves a movie frame sequence to disk.
COLOR
Palette 1 Through to palette 7 are a series of preset
palettes to use with your pictures. Color palettes
are saved with the files.
Setcolor Alter any of the colors as you please with the
advantage of seeing the effects on your display
as you make color changes.
Help Brief information & history of fractals.
Please write to me if any further information is required or if
any bugs are located. Ideas for improvements are welcome
and we are interested in collecting other fractal programs.
This program is under continual development. Send a disk for
latest version.
write to:- Ian Connor
C/- MACE
P.O. Box 340
Rosanna Vic
Australia 3084
====================================================================