home *** CD-ROM | disk | FTP | other *** search
- Documentation for
- HPFrac v 1.0
- by
- Alex Takessian
-
-
- Yet another fractal program! Yes, but this time it plots the
- Mandelbrot set at up to 300 dpi on a LaserJet or DeskJet printer. Thats
- 3000 x 2400 dots! It can also do it at 75, 100, and 150 dpi.
-
-
- This program is freely distributable as long as you don't make ANY cash
- profit from it (you can trade it though.)
-
- Send any constructive comments by EMAIL to:
- Alex Takessian Compuserve [75655,223]
-
-
- I tired of printing the typical 640 x 400 plots on my Deskjet. I
- wanted full resolution plots so I wrote this program. I hope you find it
- fun too. It easily produces publication-quality Mandelbrot images
- especially if the distance-estimation plotting method is used.
-
- The program works only from the CLI because I wanted to write portable
- code that could be compiled and run on other computer types. I easily
- ported it to PC-DOS and compiled it with Microsoft C v 5.0. Interestingly,
- the DOS version running on a COMPAQ 386 Deskpro (16MHz 80386, 80287) runs
- about 7 times slower than the AMIGA version running on an A2000/A2630.
-
- Note that HPFrac only works with a LaserJet or DeskJet -- no other
- printers are supported. Sorry. The program will either generate a file
- which can be copied to the PAR: device or it can directly write to the PAR:
- device. If you generate to a file, be aware that your file device (RAM,
- FLOPPY, HARD, etc.) must be capable of storing about 10 * dpi * dpi bytes.
- That is over 900K for a 300 dpi plot. To write directly to the PAR: device
- you just specify PAR: when the program asks for a filename. When you write
- directly to the PAR: device, the storage requirements are very low, but it
- ties up your printer for a long time. I prefer to write to a file because
- the file can be archived and saved for re-printing at a later time.
- Anything less than a 300 dpi plot can easily be written to a floppy file.
- So, if you've got enough RAM, then its best to generate to a RAM file.
- Otherwise, generate to a HARD disk file or Floppy file or directly to the
- PAR: device (in that order.)
-
- This program (actually HPFrac_6888x) is really meant for the power
- users because it eats up CPU cycles like crazy. If you've got an
- accelerator board (Imtronics, Hurricane, GVP, CSA, A2620, A2630, etc.) this
- program is for you. It'll really give your accelerator something to sink
- its teeth into. It's written in optimized Lattice C V5.04. It could be
- made faster through assembly programming and fixed-point math, but I felt
- that would limit its scope and portability too much. Since the math is
- carried out in floating-point, any portion of the Mandelbrot set can be
- plotted without the quantization errors common in the fixed-point programs.
- The quantization problem would be extremely severe in the distance-
- estimation mode where the dynamic range of the numbers is very large.
-
- The 6888x and the IEEE versions use double-precision math while the
- FFP version uses single-precision math. The IEEE and FFP versions were
- included because I didn't want to leave anyone out. So even if you don't
- have any kind of accelerator, you can still produce exceptional fractal
- plots -- you just have to wait longer. Waiting is not too bad if you run
- HPFrac as a background task with a priority of -1 and just leave your
- machine on all the time. You should use the version which is fastest on
- your hardware configuration. The IEEE version is great for those of you
- who have a 68881/2 installed as a peripheral processor (such as in the
- Processor Accelerator board.) The 6888x version only works if you have a
- 68010, 68020, or 68030 processor with a 68881/2 as a coprocessor. The FFP
- version is good if you have no accelerator or if your do have one but it
- doesn't have math coprocessor or peripheral math processor installed yet.
-
- In addition to the standard worn-out iteration limit and iteration
- modulus plotting, this program offers magnitude modulus, binary phase,
- quaternary phase, phase modulus, and distance estimation. Orbit cycle
- detection is used throughout to speed-up the calculations when inside the
- Mandelbrot set.
-
- The program is accompanied by a file called HPFrac.DAT. This .DAT
- file contains several interesting locations of the Mandelbrot set and is
- the main input to the program. When you run HPFrac, you are asked which of
- the locations in the .DAT file you want to plot. The locations have names.
- To see them, just TYPE the file out (ie TYPE HPFrac.DAT.) The .DAT file is
- easily edited with the ED editor, so you can add your own favorite
- locations or modify the current ones. Actually, I first find an
- interesting place with one of the many excellent graphical Mandelbrot
- graphers (I prefer MandFXP by CygnusSoft), then I enter those coordinates
- into the HPFrac.DAT file and run HPFrac to generate the plot. The format
- of the .DAT file is:
-
- Imaginary range, Real range, Iteration limit, NAME
-
- The Imaginary range is the narrow width of the plot on the paper. This
- corresponds to the vertical direction on the screen for the graphical
- Mandelbrot programs. The Real range is the long direction of the paper
- plot and corresponds to the horizontal direction on the screen. The
- iteration limit is the same as on the graphical programs. It specifies the
- maximum number of iterations spent on each point to determine if it lies in
- the Mandelbrot set. The name is there as a descriptive label. You can
- make up your own names. Descriptions of the various plotting modes follow.
-
- Iteration Limit
- This mode plots a dot only when the iteration limit limit is reached for
- that value of C represented by the dot.
-
- Iteration Modulus
- This plots a point if (iterations / divisor) mod 2 is equal to 1. Where
- iterations is the number of times the Mandelbrot equation can be iterated
- before the iteration limit is reached or before the iteration becomes
- unstable. This creates a contour map of iteration values. The divisor
- determines the width of each contour band. This is the mode most graphical
- Mandelbrot programs work in. They plot the contour bands in different
- colors and the colors repeat over and over.
-
- Magnitude Modulus
- The Mandelbrot set is those points in C which satisfy Z(n+1) = Z(n)^2 + C
- for the number of iterations specified by the iteration limit. This
- selection plots a point if (100 * |Z| / divisor) mod 2 is equal to 1. The
- symbol, |Z| is the complex magnitude of Z at the maximum number of stable
- iterations. This looks best for macro features of the set such as in the
- "WholeSet" selection in HPFrac.DAT. It makes a contour plot of the
- magnitude of Z with the contour band width given by the divisor.
-
- Binary Phase
- This plots a point if phase(Z) at the maximum number of stable iterations
- is either in quadrants I & II or in quadrants II & III. The choice is made
- at the beginning of the program. This makes interesting plots of the
- phase.
-
- Quaternary Phase
- This plots a point if phase(Z) at the maximum number of stable iterations
- is either in quadrants I & III or in quadrants II & IV. The choice is made
- at the start of the program. This is typically called the Binary Phase
- Decomposition of the Mandelbrot set and makes very interesting plots.
-
- Phase Modulus
- This plots a point if (100 * phase(z) / divisor) mod 2 is equal to 1. This
- gives a plot of the phase just like the Magnitude Modulus give the plot of
- the magnitude at the maximum number of stable iterations. This is good for
- macro features.
-
- Distance Estimation
- This is similar to the Iteration Limit mode except that a threshold value
- is specified which allows the plot to reveal much more intricate detail.
- This method generates the best plots I've ever seen. This method is also
- the slowest because it does a lot more calculation to determine if a given
- point is close enough to the Mandelbrot set to be considered a part of it.
- A small threshold will find fewer points. A threshold of zero is exactly
- like the Iteration Limit mode. A large threshold finds more points. I
- find a value of 0.000001 works well most of the time for plots with
- iteration limits > 500. For Iteration Limits < 500, the suggested 0.00001
- works well. Also, for this mode, increasing the iteration limit improves
- the resolution of the plot. This is unlike the plain Iteration Limit mode
- where increasing the limit will eliminate peripheral Mandelbrot points. It
- is those peripheral points which reveal the infinite beauty of this set.
-
- The program will also ask if you want aspect restoration. It is a
- good idea to answer yes unless you want distorted aspect for a special
- effect. Aspect restoration guarantees that there will be no aspect
- distortion in the generated plot even if the ranges specified in HPFrac.DAT
- have distorted aspect. Note that the ranges I've specified in HPFrac.DAT
- do have some distortion in them.
-
- To get acquainted with the program, run it on "WholeSet." This will
- plot the entire Mandelbrot set. Try the different plotting modes at 75 dpi
- to get a rough idea of what they do. You should get plots rather quickly
- at 75 dpi.
-
-
- Enjoy!
- Alex Takessian
- CIS [75655,223]
-
-
-
-
-
-