Short: Explore the beauty of Mandelbrot and Julia fractals Author: DAHLHOF@reze-1.rz.rwth-aachen.de Uploader: DAHLHOF reze-1 rz rwth-aachen de Type: math/misc Requires: MC68020 or better processor (FPU supported) Architecture: m68k-amigaos (I uploaded this twice, since the first upload failed, and the server did not allow me to overwrite the file... Do not load the file Mandelbrot1.1.lha . Mandelbrot & Julia Fractals About: This is a little program i wrote for fun, and now I decided to complete it and make it system friendly (no direct BitMap writes, etc.) and copy it around. That was the first version of it. After a request by Nils Goers, I added FPU usage and a screen-mode request. Should the program be unable to open asl.library version 38 and intuition.library version 36, it will simply open a standard PAL screen. I also found two bugs in the old program. One slowed rendering, the other could have crashed the program, but never did. (I don't understand why.) Read the window on the program's screen for instructions and play around. The Mandelbrot-pattern is a wonderful thing to explore, that's why I made this program.. Hitting ESC exits the program any time. All three windows can be closed, they can be reopened by hitting I, C or A. Click in the picture to magnify around that spot. Hit Return to restart your exploration. The Control window contains the Gadgets for selecting Julia fractals. You can change iterations, magnify, or change fractal before rendering finishes. The program will then restart rendering. Internas & multitasking Note that the non FPU part works with 32-bit numbers. If you zoom in too much (magnified about *1000000000), the picture will become chunky, then the screen will turn blank. The program does not crash, but its range is exeeded. If you have an FPU and have it enabled, you can magnify more than that and rendering is a little faster. (The FPU version is optimized for MC68040 FPU, which has less instructions than the 68882 FPU) All the calculation is performed in a low priority subtask. If any other higher priority task is running full time (without ever calling EXEC/wait) this program's subtask will not get any more CPU time from the operating system. Stop these tasks or reduce their priority below -25. For example, games like Microprose's Railroad tycoon poll for key inputs instead of waiting for them, wasting system time. Copyright There is no copyright on this. Just don't try to claim this your work... Screen resolution If the screenmode request pops up, you can select any mode. Otherwise, a standard PAL HiRes screen pops up. Pick a screen at least 200 pixels high. If you do not, the program will be unable to open its control window. Graphics export There is no function to save pictures to disk. To save a picture, close the windows, wait for rendering to complete, then use jour favorite screen grabber to save the picture. System requirements The Program requires a 68020 or better processor to run, since it uses the instructions 'muls.l' and 'mulu.l'. I think a 68000 version would be too slow, so I did not bother making one. If you have a 68882 or campatible FPU, the program will detect it an allow you to use it. I do not have an Amiga with an external 68882 FPU and only tested the program with th MC68040 internal FPU, but I hope it works with a 68882. The program should run on >any< Amiga with at least a 68020 processor and any revision of the operating system, but if you encounter any problems, please let me know. I tested it on the Amiga 4000/040 and the Amiga 1200 (68020, no FPU), both running Kickstart 39.106 and WB 3.0 Speed The use of system routines for graphics output reduces the speed a little, but most of the working time is used for the iteration and I hope, it is compatible to graphics boards. I did not have a chance to test that. The recursive algorithm greatly increases speed compared to pixel-by-pixel calculation, but the more you magnify and increase iteration depth, the longer it will take to render a frame. about the quick option: There is a 'quick' option in the control window. I tried another recursive algorithm there, but found, that it was not a very good improvement. I left it in the program anyway. The algorithm just sets four dots in each rectangle (the corners) and compares their colors. If they are equal, the program fills the rectangle. This also clips off some parts of the patterns. by: Achim Dahlhoff Aachen, germany email: DAHLHOF@reze-1.rz.rwth-aachen.de