home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Format 22
/
Disk22.iso
/
FDESIGN.ZIP
/
FDESIGN.DOC
< prev
next >
Wrap
Text File
|
1990-01-24
|
15KB
|
371 lines
Fractal Designer v3.08 by Doug Nelson Jan 24, 1990
Introduction
o - This is a tool that can generate a billion billion unique fractals.
o - The executable program is submitted to the public domain. I would
appreciate comments on improvements or enhancements.
o - This is not a Mandlebrot set or Julia set fractal program.
o - If you have a supported printer, you can document your fractals and
print a high-resolution fractal using the "virtual screen" option.
o - Fdesign 3.07 displays differently than Fdesign 2.05.
* The aspect ratio of triangle transformations is preserved (this
turns out to be mathematically important). The "auto-scaling"
will cause the attractor to span either the y direction or the x
direction, not necessarily both. As a result, some of your
fractals from v2.05 will display differently than before.
o - Fdesign 3.07 .TRN files cannot be read by Fdesign 2.05 or earlier.
The file format has changed to provide "fractional" pixel locations
for triangles. However Fdesign 3.07 CAN read files from any earlier
revision.
Hardware Requirements
o - An 80x87 is a must to make this program fun.
* To give you an idea of coprocessor enhancement:
an 8 MHz XT w/coprocessor > a 20 MHz 386 w/o coprocessor
o - The program requires either EGA or VGA graphics. VGA is much better
because the pixel size is square. (Sorry EGA fans, I didn't scale for
odd-sized pixels).
o - A mouse is a must. In developing this program I used a Microsoft
mouse, but have found some so-called "compatibles" that do not support
a screen cursor.
o - It also requires 350k bytes of free memory on an IBM PC-compatible
computer (less if "Virtual Screen Print" is not used).
o - A printer must be able to receive commands for one of these:
* HP Laser Jet II P --- the best pictures
* Epson 24 pin compatible --- I used an LQ-1000 for testing
* Epson 9 pin compatible --- I used an early FX series model
Revisions
o - v3.08 - more enhancements:
* A command line option to view .TRN files.
* You may have up to 32 triangle transformations.
* Zooming support on main screen and "virtual screen print".
* GIF file saving.
* IFS codes and FRACTINT interface
* Color codes exclude WHITE, DARKGREY, and BLACK.
* Two video "modes" available:
# Normal plot --- color codes the triangle transformations
(or IFS codes).
# Alternate display --- increments the color code every time
a pixel is plotted (shows density).
o - v2.05 - lots of enhancements:
* A bug that caused a floating point domain error has been
removed.
* Three printer types are supported.
* A "virtual screen" has been added with 1504x1200 resolution
(used only for printing).
* File menu now shows a little plot from the filename you click
on.
* 256 color plotting added.
* You may turn off the graticule spacing when adjusting triangle
transformations.
* Menus have been "cleaned up".
o - v1.00 - added the 'small plot' to the Modify screen and the 'adjust
triangle' command.
o - v0.01 - the first distributed copy of FDESIGN.
Basic Fractal Education
o - Not all fractals can be generated by this program.
o - IFS stands for Iterative Function System, just one method of
generating fractals.
o - The IFS fractals define a space which has a "fractional" dimension.
This space has a "shape" defined by the IFS codes.
o - Each IFS code is derived from a "transformation". At least two
transformations are required to generate a fractal.
o - The triangle transformations.
* (The following may not be strictly correct)
* IFS codes are derived from Affine transformations. A
transformation triangle maps "from" the reference triangle "to"
the transformation triangle itself.
* An Affine transformation moves points closer together. In
general, a transformation triangle must be smaller than the
reference triangle. More specifically, the A-B side of the
transformation triangle must be shorter than or equal to the A-B
side of the reference triangle. The same is true of the B-C and
A-C sides.
* However, a transformation triangle may not have all three sides
equal to the reference triangle.
* The program will display an error message if you attempt to
input a non-Affine transformation triangle.
# You can re-define the reference triangle by a "Scratch
Everything" command.
o - Random IFS Algorithm
* A beginning point is selected which is on the fractal.
* A transformation triangle (IFS code) is randomly selected.
* The selected transformation is applied to the current point and
the new point is plotted.
* One down, millions to go.
* Goto back to randomly select a transformation triangle (may or
may not be the same as the transformation just applied).
* That's all there is to it. Amazingly simple isn't it? The
problems are in the user interface.
* Even though the transformations are randomly selected, the
resultant image is the same (by mathematical proof). Given
infinite time, the resultant image has infinite detail, so the
algorithm repeats until you interrupt with a mouse click.
o - The references will give you everything you ever wanted to know on
the theoretical basis for these images.
Running the program
o - As a warning, if you don't have a coprocessor, the delays may be
intolerable.
o - To view a fractal (no mouse required) from the command line:
* fdesign sierpink
or
for %1 in (*.trn) do fdesign %1
to view all .TRN files in the directory
o - For interactive design, type "fdesign" return.
o - The mouse is used for most prompting. Hit the mouse button for the
top menu (without a coprocessor you may have to hold the mouse button
down until the menu appears).
o - The Top Menu screen:
* Normal Plot - plots (to the screen) the current fractal in EGA
or VGA 16 colors.
* Edit Transformations screen - allows you to change the
description of the fractal (edit triangle transformations).
# If the transformations are complete enough, a small fractal
image is displayed concurrent with your edits.
# Scratch Everything - cleans the workspace. Then you
specify a reference triangle and input transformation
triangles until your right mouse button ends the input.
# Add a Triangle - you input three points defining an
additional triangle.
# Delete a Triangle - you select a triangle to delete.
# Adjust a Triangle - allows you to move a single vertex of a
triangle.
First select a triangle by finding an unambiguous edge
of the triangle and click left.
Then click on the corner you wish to move.
Now you may move the cursor to the new position and
click left. The fractal image in the upper right
updates with your edits.
You may continue to click left and watch the fractal
change in the upper right corner.
When you're satisfied, click the right mouse button.
# Grat is on/off - clicking on this will toggle the "on/off".
If grat is off, you may place triangle vertices between
dots. If grat is on, the closest graticule will be used to
place the vertex.
# Main Menu - return to plot fractal on the big screen.
* Load file screen - load a transformation (.TRN) file.
# You may click left on a filename to preview the fractal in
that file.
# When you see the one you want, click right.
# You will be thrown into the Edit Transformations Screen.
If you want a big screen image, click on "Main Menu"
immediately.
# I have included several .TRN files which you may load,
display and modify.
* Save file - save the current transformations to a file.
# Type in the filename (without extension) that you wish to
save the transformations to.
# If the filename already exists, you will be prompted for an
ok.
# Saving to another subdirectory or disk is not supported.
* Alternate display - plots in 16 colors, but starts with color 1
and increments the color every time a pixel is re-plotted.
* Print - Prints the filename, the current screen, the Edit
Transformations and IFS codes. This is intended as a way to
document your fractals.
* Virtual Screen Print - Use this to create high-res pictures on a
printer.
# Plot 1000000 points - Plots to a virtual screen (1504x1200)
a million points. I've found a million to be adequate for
most images. This number will increase if you have already
zoomed on the image. This number is only a recommendation
by a very dumb algorithm.
# Plot N points - Again, this plots to the virtual screen as
many points as you specify. It occasionally happens that
you may need to plot 20 million points to get a full
picture. You specify the number of points in thousands
(5000 means 5 million).
# Print - prints the virtual screen to your printer on LPT1.
# Return - gets you back to the top menu.
* IFS codes (FRACTINT)
# Write a FRACTINT file --- computes IFS codes for FRACTINT's
screen size and writes an ascii file with an extension of
.IFS.
FRACTINT viewing is accomplished with the following
command line:
FRACTINT type=ifs ifs=myfile.ifs video=F4
You would, of course, replace 'F4' with your own
video mode preference from the help screens.
# Read a FRACTINT file --- computes triangle transformations
from the IFS codes. Allows you to edit the transformations
and then save as a .TRN file or a .IFS file (for FRACTINT
viewing).
# IFS codes for this screen --- these are a,b,c,d,e,f,p used
to generate the main display. Note that no scaling to the
display is required --- the IFS codes are already scaled for
it.
* Zoom in
# Brings up a zoom box.
# The box may be moved by moving the mouse.
# The size of the box may be changed by holding the left
mouse button and moving the mouse up or down.
# To accept the zoom box, type any key.
# Multiple zooming is allowed, but know that the computation
time required increases with every zoom.
* Zoom reset - reset to the original full-sized image.
* Save to .GIF - makes a copy of the screen to a .GIF file.
* Quit - returns you to DOS.
Future Enhancements
o - 3-D fractals (anyone know how to input tetrahedrons nicely?)
o - Variable "virtual screen" size
o - TIFF file saving (if I can find the necessary technical info).
Tips on Building Fractals
o - Experiment with only two transformation triangles. There is a lot a
of creativity in some of those two triangle transformations. Then add
a triangle and experiment with various rotations and scalings.
o - Start with one of the example files and adjust a corner and watch
the progress.
o - When adding a triangle, start with a small triangle and adjust its
corners while watching the fractal in the upper right corner.
o - Make the colored regions "just touching" to create interesting
connections.
o - Expert fractal designers are made by 99% perspiration. I'm lucky to
get one out of five that has any lasting appeal. To me, creating
fractals seems like a very intuitive process. I've designed the user
interface to facilitate a quick design cycle.
References
o - An excellent starting reference is "Fractals Everywhere" by Michael
Barnsley.
o - BYTE magazine, January 1988.
o - A good reference is "The Science of Fractal Images" by M.F.
Barnsley, R.L. Devaney, B.B. Mandlebrot, H.-O. Peitgen, D. Saupe, and
R.F. Voss with contributions by Y. Fisher and M. McGuire.
o - Thanks to Bert Tyler [73477,433] (CIS) and Lee Daniel Crocker
[73407,2030] (CIS) for their .GIF encoder.
Send any comments or suggestions to:
Doug Nelson
1002 San Jacinto #316 Arbors
Irving, TX 75063
Compuserve ID 70431,3374
SouthWest PC Users Group BBS 214-790-8960 ID=DOUG NELSON