home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / fractals / _juliaanim / !JuliaAnim / !Help < prev    next >
Encoding:
Text File  |  1992-02-20  |  7.5 KB  |  91 lines

  1.  
  2. !JuliaAnim v1.10: Quadratic Julia Set Real Time Animator.
  3.  
  4. By Ivar Wind Skovgaard.
  5.  
  6. This version finished Wed,12 Feb 1992.
  7.  
  8.  
  9. Introduction:
  10.  
  11. This !Help file is not supposed to explain what fractals, Julia sets and complex numbers are. For those who don't know this I suggest they read a book on the subject. However the program can be used by everybody to see some animated sequences of Julia sets.
  12.  
  13. !JuliaAnim displays quadratic Julia sets and uses the inverse iteration method to allow you to explore the effects of different complex constants in the formula in 'real time'.
  14.  
  15. By moving the mouse or using the cursor keys you can change the complex constant in the expression for the Julia sets and (because of the speed of the inverse iteration method as well ARM machine code) immediately see the shape of the set change on the screen (which is what I call 'real time').
  16.  
  17.  
  18. Using the program:
  19.  
  20. Double-clicking on the !JuliaAnim icon will start !JuliaAnim, which takes over all the processing time of the machine (except for interrupts).
  21.  
  22. The program is controlled from the keyboard or the mouse. Initially the mouse is selected for control and by moving it you change the complex constant c shown at the bottom of the screen. During mouse control only three keys can be used:
  23.  
  24. M           : Toggles between mouse and keyboard control.
  25. P           : Toggles mouse pointer on and off
  26.               (the pointer is only shown during mouse control).
  27. Esc         : Quit the program.
  28.  
  29. In addition the following keys can be used during keyboard control:
  30.  
  31. Cursor keys : Changes the complex constant c in steps of 0.01
  32.               (when Shift is held down the steps are 0.05
  33.                but when Ctrl is held down (without Shift) the steps are only
  34.                0.001 and the number of frames per second is lower)
  35. Home        : Return to initial complex constant (-0.75+0.5i).
  36. Copy        : Redraw with current complex constant.
  37. F1-F12      : Choose one of twelve preset complex constants
  38.               (these are the ones from page XII of 'The Beauty of Fractals').
  39. A           : Toggles automatic animation on and off
  40.               (during automatic animation the complex constant is made to
  41.                follow the edge of the cardioid and the greatest circle of
  42.                the Mandelbrot set).
  43. R           : Toggles random automatic animation on and off
  44.               (during random automatic animation the complex constant moves
  45.                in a direction which changes randomly).
  46.  
  47. This program is not very accurate and it would not be well suited for zooming into the images. Because of that the display is fixed to a part of the complex plane with real values ranging from -2 to 2 and imaginary values ranging from -1.6 to 1.6. This is not as bad as it may sound because Julia sets do not increase in complexity when you magnify them and unlike the Mandelbrot set will usually display all their unique features on the macroscopic level.
  48.  
  49. For some special values of the complex constant the images are not even correct at the macroscopic scale. In these images the actual Julia set can be seen but in addition there are some points outside the Julia set where there should be no points. This happens in particular for complex constants with real part close or equal to zero and may be because of inaccuracies introduced by tabulating the trigonometric functions used. Also for complex constants with a magnitude (distance from 0+0i) greater than two the images will usually be incorrect because of overflow in the calculations.
  50.  
  51.  
  52. Additional information:
  53.  
  54. The program is based on the quadratic formula x(n+1)=x(n)^2+c, where x and c are complex numbers, however it uses the inverse iteration method to find points on the edge of the Julia sets. This method is described in 'The Beauty of Fractals' by H.-O. Peitgen and P.H. Richter.
  55.  
  56. The inverse iteration method actually does the iteration the other way round: x(n+1)=SQR(x(n)-c). This is not as easy as it looks because x and c are complex numbers and the calculation of the square root of a complex number requires the calculation of two normal square roots, one arcus tangens, one sine, one cosine, one division (actually two but one of these is simply division by two which the ARM can do in zero instructions!), four multiplications, one addition and in 50% of the iterations an extra addition and two extra subtractions. The trigonometric functions are done by table lookups (the arcus tangens is done by a simple table lookup and the sines and cosines are done by a more advanced table lookup written by Christian Larsen) but the rest is done by 32-bit integer calculations. After a few initial iterations all the x's calculated can be plotted.
  57.  
  58. The points are plotted (by direct screen access) both in the position of the actual x value but also mirrored around 0+0i at -x because Julia sets are symmetric around 0+0i.
  59.  
  60. Due to the speed of the ARM the program plots approximately 8750 points per second (including the mirrored ones) during manual animation (12.5 frames per second), 10000 points per second during automatic animation (10 frames per second) and 9750 points per second during random automatic animation (12.5 frames per second). However if you don't change the constant but let the program go on with the same set the speed increases to approximately 10200-10500 points per second depending on whether it is under keyboard or mouse control (the latter is fastest). If the machine code is allowed to plot a very large number of points before returning to basic it can actually do more than 11200 points per second, but that is not possible with the current control program.
  61.  
  62.  
  63. Future improvements:
  64.  
  65. If I ever learn how to write a proper multi-tasking application I might turn this program into one, however it is much more likely that I make it possible to see a picture of the Mandelbrot set in the background with an indication of where the current complex constant is located, and I have also thought of implementing user-defined automatic animations as well as a facility for (slowly) creating high quality still images of Julia sets.
  66.  
  67.  
  68. Distribution:
  69.  
  70. This program is Public Domain! You may copy it freely (and please do) as long as you do not sell it for a profit (PD-libraries are naturally allowed to cover their costs) or include it with a product that is sold for a profit (without my permission - 'The Micro User' is allowed to use this version on their cover disc) and as long as you do not change or delete any of the original files which are:
  71.  
  72.                                         !JuliaAnim (not really a file),
  73.                                         !JuliaAnim.!Boot,
  74.                                         !JuliaAnim.!Help (this file),
  75.                                         !JuliaAnim.!Run,
  76.                                         !JuliaAnim.!RunImage,
  77.                                         !JuliaAnim.!Sprites,
  78.                                         !JuliaAnim.mc and
  79.                                         !JuliaAnim.MemAlloc
  80.  
  81. If MemAlloc is missing then you can just copy it from the !Lander application on the App2 disc (at least that's where it is in my version of RiscOS).
  82.  
  83.  
  84. Finally:
  85.  
  86. If you have any suggestions for improvements to this program or have wr. Iten some interesting fractal program yourself which you want to tell me about or just want to tell me what a great program you think !JuliaAnim is then you can contact me by wr.ting to:
  87.  
  88.                                         Ivar Wind Skovgaard,
  89.                                         HavsgÃ¥rdsvej 27,
  90.                                         2900 Hellerup,
  91.                                         Denmark.