Fractals

Fractal generation

I created these programs that generate fractals for my own amusement. The core part of the fractal generation program JULIA1.PAS was based on the source code from a computer magazine. The other generation programs were modified by me to see what would be the results. After exploring the results, I created a small program (EXPLORER.PAS) that allowed me to do a zoon in a specific area of a fractal. I also created a simple algorithm to compress the output file. The reason was that I had space restrictions at that time. The compression is simple. It just indicate how many repetitions of the same colors for consecutive pixels. Than, the exit file was smaller when there were big areas with the same color. Originally, I generated the fractals for a Super VGA resolution of a Trident graphical card. I developed the access code to the card commands using Assembler inserted in a Pascal unit (VGA.PAS). However, I modified all files to use only VGA resolution because it is the maximum that DOSBox supports. Although these programs are old, they still run in Windows. The only program that needs DOSBox are the visualization. This is because the actual computers are too fast to visualize the pallete animation that I created: LEFRACT.PAS.

Generation of fractals

The generation files are all the ones which name begin with JULIA or MANDEL, as an example JULIA1.EXE, MANDEL1.EXE, etc. These files generate fractals files with extension ".FRC", like JULIA1.FRC, MANDEL1.FRC etc. These executable files can be executed through Windows. Just click on the executable files.

Picture: Julia Fractals.

Before it is possible to visualize the fractals, it is necessary to generate the fractal files. To do that, just execute all the executable files that begin with JULIA and MANDEL. Only after this it is possible to go to the fractals visualization step below.

Visualization of the fractals

In order to visualize the fractals, it is necessary to execute the file LEFRACT.EXE through DOSBox. Just follow the steps below:

Picture: Fractal viewer.

  • Install the emulation program DOSBox v0.70.

  • Alter the file dosbox.conf putting machine=vga and cycles=auto.

  • Expand the file below (1992-10F.zip) in the root of the C:\ disk. The directory "c:\1992-10F" will be created containing the executable files and the source codes written in Pascal.

  • Execute DOSBox and enter the command "mount c C:\". You can disconsider the alert message that appear.

  • Go to C drive by using the command "C:"

  • Go to the directory that has executables by using the command "CD C:\1992-10F\bin"

  • Execute the fractals viewer running the file LEFRACT.EXE.

  • To select a fractal use the keys on the numeric keyboard (keys 8 or 2). It is also possible select the file using the mouse. Just click on the DOSBox window and click on the letter S to go up and D to go down. The selected file is in white. To view the fractal click on the text Ok. To exit the program click on X.

  • Once you chosen the file, you can click ENTER to view it. When the fractal appears completely you can see five types of palette animation. You can select the animation type by pressing the numbers 1 to 5. To invert the animation sequence press the space bar. To exit the program press the ESC key.

To explore the Mandel fractal

The exploration file doesn't use palette animation, therefore it can be executed directly from Windows, just click over the file EXPLORER.EXE. When the fractal file appears, there will be a red pixel in the upper left corner. The objective is to indicate the superior-left position and inferior-right position to be enlarged. The indication is done by using this pixel. It is necessary to move it for to the desired position using the numeric keyboard, 8 to go up, 2 to go down, 4 to go left and 6 to go right. When you move the red pixel over the desired position than indicate it by pressing the minor sign "<". Indicate the area to be expanded by pressing the key 6 of the numeric keyboard and the cursor will move in the diagonal. When it reach the desired position press the symbol ">" and ENTER to conclude. The constants values for the next image is printed and the fractal is drawn. Write down the constant values in case you want to generate this fractal again. To do that it is necessary to modify any fractal generation file and to insert the values in the constants.

Picture: Mandel Fractal

Each time an area is enlarged, a fractal file is generated with name EXPLORER.FRC. It can be viewed by the visualization file LEFRACT.EXE.

Other files

The file TSTMOUSE.PAS is only to test the access to the mouse. It is possible to read the cursor position when the mouse is moved. It can execute and lines are drawn when the mouse is moved while pressing the mouse left button.

The file VGA.PAS is a Pascal unit that allows the interaction with a Super VGA Trident card. I has Assembler code in it.

Download Fractais
Informaion Content

Name

Fractais

Implemented on

1992/10

Size

149Kb

Executable and source code

1992-10F.zip

Language and compiler

Turbo Pascal V.6