home *** CD-ROM | disk | FTP | other *** search
- CPM
-
- Continous Potential Method
-
- made 1989 by Lars R. Clausen
-
-
- About CPM:
-
-
- CPM is short for Continous Potential Method, an algorithm for the
- MandelBrot set, which I have found in the book 'The Science of Fractal
- Images", by H.O.Pietgen and D. Saupe. The theory of it will be shown below.
- It is used here to make 3-dimensional pictures of the MandelBrot set, of as
- much beauty as the resolution and the CPU time used will allow. As rather
- much time will be used for the drawing, I have implemented it with a
- DataFile, so that several pictures can be generated one after another
- without human interference.
-
-
- Using CPM:
-
-
- CPM can only be started from the CLI, and can take its data from either
- the command line arguments, or a file, which is by default CPMDataFile. In
- either case will the data used be these:
-
- XMin XMax YMin YMax MaxIt Angle Scale Lift Size SaveFileName
-
- Workbench icons have been supplied for both versions, using IconX. It
- doesn't do any copying or checking, it just executes it.
-
- If these are to be used in the datafile, each must be seperated by
- semicolons ';', all data for one picture must be on the same line, and no
- space may be placed around the Size parameter or around the SaveFileName.
-
- The meaning of the arguments are as follows:
-
- XMin XMax YMin YMax: These are the coordinates of the picture, as they may
- be found in MandelVroom or a similar program. To ensure that no distortion
- is done, YMax will be adjusted so that the aspect ratio of the picture is
- 1:1. Therefore, is does not help help anything to change the YMax parameter,
- it is only there for completeness.
-
- MaxIt is the maximal number of iterations that will be done before a point
- is said to belong to the MandelBrot set. The higher this number is, the
- longer the picture will take to generate, but the top will be most
- beautiful, if a rather high MaxIt is used.
-
- Angle denotes how much the picture will be tipped. Normally, this is 2,
- which means that for every 2 lines of the picture one line is drawn on the
- screen. This is an integer, and should not be lower than 2, but higher
- Angles will give a more flat view of the area, thus allowing more to be seen
- vertically. A special option is made here to beautify the picture: if the
- angle is set to a negative value, the numerical value will be used as the
- angle, but every line in the picture will be drawn on the screen. This takes
- a great deal more times, but steep descents will be more beautiful for it.
-
- Scale and Lift are two floats, used to make the sides of the set look more
- interesting than they actually are. Their mathematics will be detailed
- below, but picture-wise Scale will give the steepness of the side, while
- Lift will lift up the whole area. These are not precise descriptions, but to
- see the effect, try them out on a simple picture in LoRes.
-
- Size may be either L or H, meaning LoRes-NonInterLace or HiRes-InterLace.
- In both cases 16 colors will be used.
-
- The SaveFileName is the name the finished picture shall be saved as.
-
- As you will see, there are two versions of DEM: DEMTurbo and DEMNormal.
- DEMNormal uses the MathIEEEDoubTrans.library. DEMTurbo are for those users
- that are lucky enough to have an A2620 or stuff like that. It uses the
- 68881 instead, and trying to use this on a normal Amiga will cause a GURU
- 0000000B (line 1111 emulator).
-
- When running, you may close the program down by clicking on the
- closegadget. Pressing any key causes the current picture to be abandoned,
- and not saved, and then goes on to make the next picture in the definefile.
-
- How CPM works:
-
-
- CPM calculates the complex formula Zn+1=Zn*Zn+C until |Zn| is greater than
- 10000, where C is the complex coordinate of the point. When that is done, it
- calculates the potential of the point as if the MandelBrot set was
- electrically 0 and a circle of positive potential was positioned around the
- set at infinity by:
-
- Pot = 0.5 * log(X*X+Y*Y) / pow(2.0 , Number_Of_Iterations_Used)
-
- This gives a number going towards 0 near the set, which isn't very
- interesting to look at. Therefore a rescaling function is used, in this
- case:
-
- Height = MaxHeight * (1-pow(pow(2.0 , Scale) * Pot , Lift))
-
- Here is shown what exactly Scale and Lift does, though is may be hard to
- say what they will do for the picture. The result is a height rising towards
- the MandelBrot set, going towards MaxHeight, which is the height of the
- screen in pixels. As a direct display of this would let the top go straight
- through the top of the screen, it is cut off midways, and all height over
- that are used to determine the color instead.
-
-
- Disclaimer, future ideas and all that stuff:
-
-
- I can, as usual, not take any responsibility for what this program does to
- your data, computer, sleep or anything else. Is is given to you 'as is'.
-
- If anybody find bugs, make any improvements, want something more (like
- Intuition interface or a smoothed cutting), or just like my program, please
- send any letters, other programs, $$$, etc. to:
-
- Lars R. Clausen
- Hougårdsvej 29
- 8220 Brabrand
- Denmark
-
- FidoNet nr: 2:230/22.34
-
- P.S. If my English sounds a little wierd, do forgive me, as I be reading
- 'The Lord Of The Rings' rather intensively these days.
-
- P.P.S. Keep up the good work, everybody. This computer is too good not to be
- the best!
-