home *** CD-ROM | disk | FTP | other *** search
/ Fish 'n' More 2 / fishmore-publicdomainlibraryvol.ii1991xetec.iso / dirs / zplot_389.lzh / ZPlot / ZPlot.docs < prev    next >
Text File  |  1990-10-23  |  23KB  |  437 lines

  1. >>>>> ZPlot 1.3d, ©1990 by Terry W. Gintz <<<<<
  2.  
  3. ZPlot graphs formulas based on 4-D complex number planes.  ZPlot currently
  4. supports the Mandelbrot set, Julia sets, and Phoenix curves, with over 500
  5. mapping variations. The math functions supported include sin(z), sinh(z),
  6. z^z, e^z, z^n, sqrt(z), cos(z), cosh(z), tan(z), tanh(z), log(z), ln(z) and
  7. n^z.  Both lo-res(320X200) and hi-res(640X400) plots are possible.
  8.  
  9. Up to two formulas for z using the above functions may be plotted, using
  10. traditional rules for generating Mandelbrot sets (Benoit B. Mandelbrot) and
  11. Julia sets (G. Julia.)  Also, there are mapping options that use non-traditional
  12. methods, such as the epsilon-cross method (Clifford A. Pickover), and
  13. IFS (Michael Barnsley).  In addition, since the formula parser is an
  14. interpreter, with its inherent lack of speed, over thirty 'popular' formulas
  15. have been hard-coded to reduce graphing time by 40 to 60 percent.  Several
  16. of the built-in formulas are actually capable of producing graphs that the
  17. program could not generate any other way, such as applying the mandelbrot
  18. set to Newton's method for solving quadratic equations.
  19.  
  20. ZPlot1.3d adds three-dimensional and formula mapping options to ZPlot1.0.
  21. There are also 3 additional color-scaling options in ZPlot 1.3d.
  22.  
  23. About the windows and menus:
  24.  
  25. The main or Project menu:
  26.  
  27.    "New Plot" turns on zoom mode, so that detail of the the current plot may
  28. be magnified.  Using the mouse, you define a rectangular area, by clicking
  29. twice at opposite corners of the area.  The program will begin a new plot at
  30. the new coordinates.  Clicking with the left mouse button stops the plot at
  31. any point before the plotting is finished.  You may zoom in by defining a
  32. box inside the current drawing area.  You zoom out by drawing a box outside
  33. the current drawing area.  The outer zoom limits are between -99.99999 and
  34. 99.99999.  The precision is that of fast floating point (32 bits).
  35.  
  36.    "New Formula" opens the new formula window (see below).
  37.  
  38.    "Continue Draw"  continues a plot that was aborted early.  The plot is
  39. restarted at the beginning of the last row drawn.
  40.  
  41.    "Save Function" saves all pertinent information about the current plot,
  42. plus the menu settings, and an IFF file for the current screen.  You should
  43. save a function before changing the plot type with the Type menu.  Pressing
  44. 'Q' will quick save the current function to 'RAM:tempfunction' (memory
  45. permitting).  This is useful when you want to use a mandelbrot set as a map
  46. for drawing julia curves.  
  47.  
  48.    "Load Function" loads a function previously saved by ZPlot, updates menu
  49. settings and loads the IFF file for the saved screen.  If the plot was
  50. aborted before finishing, it will be continued at the last row drawn. (If the
  51. plot type was changed before saving the function, the screen will be cleared
  52. and a new plot begun.)  Pressing 'R' will recall a function saved with the
  53. quick save option.
  54.  
  55.    "Quit" exits the program.
  56.  
  57. The Plot Flags menu:
  58.  
  59.    The first two flags determine the basic plot type.  This can be
  60. Mandelbrot or Julia.  Mandelbrots have inputs of Zx and Zy, while Julias
  61. have inputs of Cx and Cy.  Zx and Zy correspond to the min/max values set
  62. in the New Formula window.  Cx and Cy correspond to the complex constant
  63. entered in the New Formula window.  With mandelbrots, Cx and Cy represent
  64. the initial value of Z before the first iteration.  This can be changed to
  65. produce non-symmetrical mandelbrots, or mandelbrots based on formulas whose
  66. inital value of Z must be non-zero to generate anything (such as
  67. f(z)=cz(1-z) where z0=0.5).
  68.  
  69.    The next five flags determine the branch limit, where iteration of the
  70. function stops and points are plotted.  This can be based on the real part
  71. of Z, the imaginary part of Z, the absolute value of the real part of Z,
  72. the absolute value of the imaginary part of Z, or usually, the absolute
  73. value of Z.  Different trigonometric functions require different branch
  74. limits to accurately map the complex sets.
  75.  
  76.    The remaining flags have to do with how the points are color-scaled, or
  77. determining which point is part of the complex set being mapped.  These are
  78. optional methods to vary the mapping of the sets, and this is where some
  79. truly spectacular effects can be acheived.
  80.  
  81. Biomorphs test the real Z and imaginary Z values after breaking
  82. the iteration loop.  If the absolute value of either is less than the preset
  83. zlimit, the point is mapped as part of the set.  This method prduces
  84. biological-like structures in the complex plane.  
  85.  
  86.    The epsilon-cross method breaks the iteration loop only if the absolute
  87. value of Z-real or Z-imaginary is less than or equal to the zlimit/1000.
  88. Other points are mapped at the time they blow up(exceed the zlimit.)  This
  89. produces hair-like structures that branch wildly from the complex set
  90. boundaries.
  91.  
  92.    Level-curves map the set points based on how small the value of Z gets.
  93. This allows the inside of the complex set, or the tenacles of the biomorph,
  94. to be color-scaled.  There are two possible level curves.  Press '2' to
  95. enable the second-type level curve (if the level option has been previously
  96. chosen). Press '1' to re-enable the first-type level curve.  The default
  97. level curve produces colored bands on the inside of the complex set.  The
  98. second level curve produces circular patterns inside the complex set.
  99.  
  100.    The Set Only flag plots all non-set points in the backgound color.
  101.  
  102.    The Newton flag is used to map the zeros of a particular function after
  103. the Newton transformation has been applied to the function.  The program
  104. doesn't make the transformation (z-(f(z)/f'(z)), where ' stands for d/dx),
  105. but it does allow you to map up to 6 attractors, and set the limit for
  106. convergence to the attractors.  Each time the newton flag is set, a window
  107. is opened to allow you to enter up to 6 attractors (or repellers) of the
  108. function, and how close z must come (the limit) to be considered in contact
  109. with the attractor.  This flag is mutually exclusive with the Level-Curve,
  110. Biomorph and Epsilon flags, and automatically excludes all points that don't
  111. converge to one of the attractors set, within the preset number of
  112. iterations.  The points that converge are colored in one of up-to-6 possible
  113. colors evenly-spaced in the current palette.  The non-converging points
  114. are mapped with the set color.  Due to rounding errors in the fast-floating
  115. point, not all points converge when all possible attractors are used,
  116. even after 1000 iterations.  Non-converging points show up typically as
  117. round areas or spots.  Generally, a limit of 50 iterations gives optimum
  118. results. The Newton transformation is normally used with Julia sets, as
  119. the attractors (solutions of the formula) can be calculated beforehand.
  120. Its also possible to explore the Mandelbrot set applied to Newton's method,
  121. but only with some of the built-in formulas mentioned above.  It this case,
  122. the solutions of the formula for every point on the screen have to be
  123. calculated separately, which the program does in a dedicated routine.
  124.  
  125. The Renormalization flag uses a hierarchical lattice transformation to map
  126. magnetic phases, with either the Julia set or Mandelbrot set as the iterated
  127. function.  (Consult The Beauty of Fractals by Pietgen and Richter for
  128. appropriate formulas to use.)  Basically, the algorithm checks orbits for
  129. convergence to 1 or infinity, and scales these points in different colors.
  130. This flag is mutually exclusive with the Newton, Biomorph, Level-Curve and
  131. Set Only flags.
  132.  
  133. The Decomposition flag does a binary decomposition on points that do not fit
  134. the complex set.  Excludes the Set Only flag.  (Consult The Beauty of
  135. Fractals for an explanation of this technique.)
  136.  
  137. The Phoenix flag rotates the planes, so that the imaginary plane is mapped
  138. horizontally and the real plane is mapped vertically.  A graded color
  139. scaling is also enabled (instead of the default modulo scaling).  This
  140. option is normally used for mapping Phoenix curves (Shigehiro Ushiki), which
  141. are julia-related curves based on the formula f(z+1)=z²+p+qz.  'p' and 'q'
  142. are constants, and the 'z' term of 'qz' is actually the value of z^n-1, or
  143. the previous value of z before the current iteration.  'zn' is reserved by
  144. ZPlot to represent this value, while the complex constant set in the New
  145. Function window becomes 'p' and 'q'.  The real part of the complex constant
  146. is 'p' and the imaginary part of the constant is 'q' (when the Phoenix
  147. option is chosen).  If the Phoenix flag is used with the Mandelbrot option,
  148. 'j' and 'k' should be used as the constants, since the complex constants p
  149. and q are already used as the starting value of 'z0'.
  150.  
  151.    If you change a flag for any function, the "Continue Draw"
  152. option is not disabled, so the plot may be modified at any point.
  153.  
  154. The Resolution menu has options for lo-res or hi-res screens.  A function
  155. saved in hi-res will be loaded into a hi-res screen (if memory permits) and
  156. the same applies to lo-res functions.  The screen and window will close, if
  157. necessary, to establish the correct resolution.  If available chip memory is
  158. less than 150 KBytes when ZPlot is initially started up, the hi-res option
  159. is disabled.
  160.  
  161. The New Formula window:
  162.  
  163.    A color-scaling menu has been added for Plot1.3d that allows you to
  164. choose between graded and modulo color-scaling.  Graded scaling uses a
  165. non-repeating color palette, while modulo-scaling repeats the color palette.
  166. The colors selected can be based on either the level-potential of a point or
  167. the escape time of a point.  You can control the rate at which the colors
  168. change by entering an optional positive number in the Color-Scaling/Cutoff
  169. Factor Box.  As the name implies, this box has varying effects based which
  170. color-scaling option is chosen.  For escape-mod plots, the color-scaling
  171. factor determines how fast the palette repeats and what its range for each
  172. color is.  For escape-grad plots, color changing is accelerated below the
  173. escape-time set by the color-scaling factor.  For level-set plots, the
  174. cutoff factor is applied to the potential of each point.  Therefore, logical
  175. entries for the color-scaling factor are integers>(size of color palette),
  176. while the cutoff factor is some fraction of the maximum potential a plot is
  177. expected to generate.  Note: this is highly experimental, so play around
  178. with it for best results.
  179.  
  180.    There are string gadgets for entering two formulas in the form of AZ+BZ+
  181. c.  Z is the complex variable or function, 'c' is the complex constant, and
  182. A and B are optional real constants.  There are additionally a Code gadget,
  183. an Arg gadget and a Limit gadget, that determine how the above formulas are
  184. processed.  The code gadget accepts a value of 0 to 9.  For a value of 0,
  185. the first formula is always used and the second formula is ignored.  For a
  186. value of 1, the second formula is processed and the first formula is
  187. ignored. For a value of 2, the first formula is processed if the Arg value
  188. (another formula which must contain only real terms) is greater than or
  189. equal to the limit set with the Limit gadget.  For a value of 3, the first
  190. formula is processed and its output becomes the input of the second formula,
  191. which is then processed.  To accomodate the Arg function, there are special
  192. variables, which the program treats as strictly real values.  'X' is the
  193. real value of Z.  'Y' is the coefficient of the imaginary part of 'Z'.  'R'
  194. is the absolute value of Z.  'J' is real part of the complex constant.  'K'
  195. is the coefficient of the imaginary part of the complex constant.  These
  196. and other real variables described below can be used in the Arg input, to
  197. create IFS maps of complex functions, as described by Michael Barnsley in
  198. his book, Fractals Everywhere.
  199.  
  200. About function syntax:  The power function 'x^y' is entered in reverse
  201. notation: 'powyx', where y is the exponent, and the variable x may be any
  202. complex variable.  The exponential function 'e^z' is entered 'exp(z)' or
  203. 'powze.'  The function 'z^z' is entered 'powzz' or '^zz.'  '^#z' or '^#e' are
  204. also valid entries for the power function, where '#' is any real exponent.
  205. The use of parenthesis is necessary around complex exponents or variables.
  206. E.g. :  'pow(1.5e)(z-i)'.  Other functions, such as sin(z), abs(z), cos(z),
  207. log(z) and ln(z) are entered algebraically, with optional parenthesis.
  208. Additional math operators that may be used for a function include ² (square),
  209. and ³ (cube).  Additional variables that may be used for functions include
  210. 'c' -- the complex constant, and 'cc' -- the complex conjugate.  Up to 26
  211. characters may be used in the first formula.  For longer formulas, up to 59
  212. characters may be used in the second formula.  Combining both gadgets, up to
  213. 85 characters may be used for a formula using the Code 3 option.
  214.  
  215. There are string gadgets for entering the complex constant (real and
  216. imaginary parts), and the min/max ranges for the real and imaginary window
  217. coordinates.  These reflect the current range values that may have been 
  218. derived from zooming with the New Plot option.  They are truncated to 5 or 6
  219. digits depending on their size (6 if less than 10.0).  You can get greater
  220. window accuracy, if necessary, by using the zoom option only, after setting
  221. all other plot parameters.  Slider-type gadgets control the number of
  222. iterations(1-500), the number of colors used(2-32 in lo-res and 2-16 in
  223. hi-res), the z-limit(1.0-100.0), and the number of real and imaginary steps
  224. used (the size of the picture plotted: 10-320 by 10-200 in lo-res, and 10-640
  225. by 10-400 in hi-res).  The more iterations used, the longer it takes to plot
  226. a function, but more detail will be present.  10 is sufficient for most
  227. biomorphs, while more iterations will be required for mandelbrot and julia
  228. sets, depending on the detail required.  The Evaluate gadget can be used to
  229. evaluate a complex expression entered in the Function #1 gadget.  The
  230. arguments must be real (no variables).  The result of the expression will be
  231. entered into the Complex constant gadgets (if not out of range).  This is
  232. useful for calculating 'c' for self-squared dragons (as described by
  233. B. Mandelbrot in the Fractal Geometry of Nature).  The Evaluate gadgets also
  234. evaluates a 2-digit code for built-in formulas (see below).
  235. Zooming is not available while plotting in 3d.
  236.  
  237. The colors gadget only affects the number of colors displayed when you use
  238. one of the 9 built-in palettes.  The change takes effect immediately when
  239. you press one of the function keys F1-F9.  Thus, even finished or partially
  240. done plots may be reduced or increased in colors (using the Continue
  241. gadget).
  242.  
  243. Click on the 2DPlot gadget to start a new 2d plot from column 1.  Click on
  244. Continue gadget to continue a plot at the row it left off, if it is not a
  245. complete drawing.  (If the drawing is complete, you can still use Continue
  246. to change the number of colors in any picture.)  You can change any
  247. parameter, and use Continue to see the effect of increased resolution, a
  248. different formula, etc.  Click on Cancel to retain the previous drawing
  249. parameters and picture.
  250. Click on 3DPlot to open the 3dOptions window, which gives the choice of 4
  251. different 3-dimenision plots, based on linear or logarithmic slopes.  The
  252. high plots map hill-type drawings, while the low plots map valley-type
  253. drawings.  There is also a MapIff option which allows you to map any IFF
  254. file onto a sphere or other plot based one or two three-dimensional
  255. functions, such as cos(x)+sin(y).  The only preset currently supported is
  256. F0, which draws a sphere using the formulas: ±sqr(x²-y²).  There is some
  257. extra code in the preset to bring ends together and generally improve the
  258. plot.  The mapping options are similiar to those found in my program Plot.
  259. See the docs on Plot for further information.
  260.  
  261. Pressing the letter 'C' on the keyboard, while not plotting, will cycle the
  262. colors of the current screen palette.  Color #2 is not cycled, as this is 
  263. reserved for representing enclosure in the complex number set.
  264. Pressing 'S' will cycle all the colors, including the set color.
  265.  
  266. There are nine palettes available via function keys F1-F9.  Optional
  267. palettes may be loaded by modifiying the palette of one of the .iff files
  268. saved by ZPlot (using any IFF-compatible paint program), and reloading the
  269. function.  ZPlot uses a default palette for all menu and requester
  270. operations.  When switching resolutions, the program will preserve the
  271. current palette, where possible.  Going from hires to lores, the 16-color
  272. palette will be duplicated to fill the 32-color palette.  Going from lores
  273. to hires, the first 16 colors will be preserved for the 16-color palette.
  274. Pressing 'H' holds the current palette in a buffer, so you use it in another
  275. function.  Load the function after pressing 'H' and the saved palette will
  276. be restored.  You must press 'H' each time you load a new function, if you
  277. want to preserve the current palette.
  278.  
  279. Pressing 'P' allows you to grab a point from the screen and place that
  280. value (real and imaginary) into the complex constant used by julia sets.
  281. This is useful when using mandelbrot sets as maps to julia curves.  Position
  282. the cross lines over the point you wish to grab, and press the left mouse
  283. button.  
  284.  
  285. As a quick reference guide, the following summary is provided about
  286. supported functions and their syntax, constants and variables, hot keys,
  287. menu short cuts, and built-in formulas with their descriptions:
  288.  
  289. Functions (capital letters are optional, and parenthesis are necessary
  290. around complex expressions)
  291.  
  292. sin z --- sinz or SIN(Z)     ; where Z can be any complex expression
  293. sinh z --- shz or SH(Z)
  294. cos z --- cosz or COS(Z)
  295. cosh z --- chz or CH(Z)
  296. tan z --- tanz or TAN(Z)
  297. tanh z --- th or TH(Z)
  298.  
  299. w^z --- powzw or POW(Z)(W) or ^(z)(w)  -- where z is the complex exponent and
  300. w may be any complex variable or expression
  301.  
  302. n^z --- powzn or POW(Z)(N) or ^(z)(n)  -- where n is a real variable or
  303. expression
  304.  
  305. e^z --- expz or EXP(z)  -- the exponential function
  306.  
  307. log z --- lnz or LN(Z)       -- natural log of z
  308. log10 z --- logz or LOG(Z)   -- log of z at base 10
  309.  
  310. abs(w) --- absw or ABS(W)     -- absolute value of complex term W
  311. sqrt(z) --- sqrz or SQR(Z)    -- square root [actually POW(.5)(Z)]
  312.  
  313. Math operators
  314.  
  315. + --- +  addition
  316. - --- -  subtraction
  317. * --- *  multiplication
  318. / --- /  division
  319. ² --- ²  square
  320. ³ --- ³  cube
  321.  
  322. Constants and variables
  323.  
  324. i  --- i or I  -- square root of -1
  325. e  --- e or E  -- 1e^1 -- 2.71828
  326. pi --- pi or PI -- 3.14159
  327. complex constant --- c or C
  328. complex conjugate --- cc or CC
  329. p --- p or P  -- real constant used in phoenix maps; uses the real part of
  330. the complex constant when the Phoenix option is chosen
  331. q --- q or Q  -- real constant used in phoenix maps; uses the imaginary
  332. part of the complex constant when the Phoenix option is chosen
  333. z --- z or Z  -- function value at any stage of the iteration process
  334. zn --- the value of z at the previous stage of iteration
  335. r --- r or R  -- absolute value of Z
  336. x --- x or X  -- real part of Z
  337. y --- y or Y  -- coefficient of the imaginary part of Z
  338. j --- j or J  -- real part of the complex constant
  339. k --- k or K  -- coefficient of the imaginary part of the complex constant
  340. Note:  j and k are the actual values of the complex constant terms as they
  341. are used in the iteration process, so will vary when the Mandelbrot option
  342. is used.
  343. s -- s or S -- the constant entered in the Limit gadget
  344.  
  345. Hot keys
  346.  
  347. F1-F9 --- change to one of 9 color palettes -- useable during plotting.
  348.  
  349. C --- cycle all colors, except set color, one step -- useable during
  350. plotting.
  351.  
  352. S --- cycle colors one step, including set color -- useable during plotting.
  353.  
  354. 1 --- enable type-one level curve (if level curve option is selected)
  355. 2 --- enable type-two level curve (if level curve option is selected)
  356.  
  357. H --- save current palette for next function load
  358.  
  359. Q --- quick save function and screen to RAM:tempfunction
  360. R --- restore function and screen from RAM:tempfunction
  361.  
  362. P --- grab point (real and imaginary parts) and put values in complex
  363. constant
  364.  
  365. Menu Short Cuts
  366.  
  367. Left-Amiga-N --- zoom on for new plot
  368. Left-Amiga-F --- open New Function window
  369. Left-Amiga-C --- Continue plotting of unfinished map
  370. Left-Amiga-S --- open Save Function window
  371. Left-Amiga-L --- open Load Function window
  372. Left-Amiga-Q --- Exit ZPlot
  373.  
  374. Built-in Formulas (enter the following prefix into the Function #1 gadget)
  375.  
  376. p0 -- z²+c --- the standard Mandelbrot or Julia set
  377. p1 -- cz(1-z) --- the self-squared dragon set
  378. p2 -- c(z-zr) --- alternate Mandelbrot or Julia set
  379. p3 -- cz²-1 --- alternate Mandelbrot or Julia set
  380. p4 -- z²/(1-cz²) --- alternate Mandelbrot or Julia set
  381. p5 -- z³+c --- cubic Mandelbrot or Julia set
  382. p6 -- ((z²+c-1)/(2z+c-2))² -- renormalization formula for q-plane pictures
  383. p7 -- z²+j+kzn --- Phoenix curve
  384. p8 -- Julia set IFS
  385. p9 -- z²+sin(c) --- alternate Mandelbrot or Julia
  386.  
  387. r0 -- sin(z)+z²+c --- used with Biomorph option, etc.
  388. r1 -- z^z+z^s+c --- Biomorphs, etc.
  389. r2 -- z^s-z+c --- Biomorphs, etc.
  390. r3 -- sin(z)+exp(z)+c -- Biomorphs, etc.
  391. r4 -- ln(z)+z²+c -- Biomorphs, etc.
  392. r5 -- csin(z) -- transcendental Julia curve, etc.
  393. r6 -- cexp(z) -- transcentental Julia curve, etc.
  394. r7 -- ccos(z) -- transcendental JUlia curve, etc.
  395. r8 -- foggy coastline #1 Mandelbrot IFS  (M. Barnsley)
  396. r9 -- foggy coastline #2 Mandelbrot IFS  (M. Barnsley)
  397.  
  398. e0 -- solves modified newton transformation of (z+j)(z+k)(z²+1) for either
  399. Julia or Mandelbrot set.
  400. e1 -- solves modified newton transformation of (z+j)(z²+z+k) for Mandelbrot
  401. and Julia set.
  402. e2 -- solves modified newton transformation of (z-1)(z²+z+c) for either Julia
  403. or Mandelbrot set.
  404. e3 -- solves modified newton transformation of (z+j)(z+k)(z+1) for either
  405. Julia or Mandelbrot set.
  406. e4 -- Chaos Game Julia IFS (M. Barnsley)
  407. e5 -- snowflake Julia IFS (as described in Fractals Everywhere by M.
  408. Barnsley)
  409. e6 -- solves newton transformation of logz-c --- primary roots only.
  410. e7 -- solves newton transformation of exp(z)+c for Mandelbrot or Julia set.
  411. e8 -- solves modified newton transformation of (z-c)(z+1)(z-1) for Mandelbrot
  412. or Julia set.
  413. e9 -- solves newton transformation of (z-c)(z+c)(z²+c²) --- z^4-c^4.
  414.  
  415. s0 -- solves newton transformation of cosz-c
  416. s1 -- sexpz+c -- transcendental Mandelbrot or Julia set
  417. s2 -- c(z²+1)/z(z²-1)  -- B. Mandelbrot's first complex set formula
  418.  
  419. Note 1: click on the Evaluate gadget to see a brief description of the
  420. bulit-in formula displayed in the Function #2 gadget.
  421. Note 2: all pertinent menu flags must be set for built-in functions to work
  422. as described.
  423. Note 3: modified newton transformation uses the formula: z-(f(z)/(f'z(z)+si),
  424. where the s constant (optional) is entered via the Limit gadget.
  425. Note 4: the prefixes s3-s9 and t0-t9 are reserved for future program
  426. expansion.
  427.  
  428. Any questions, comments or donations for this program should be addressed to:
  429.  
  430.    Terry W. Gintz
  431.    4237 Marcum Lane
  432.    Eugene, Or 97402
  433.  
  434. A $20 donation for ZPlot1.3d gets you the docs to all my current programs
  435. (including those not in the Fred Fish collection), a choice of any of them
  436. at $5 off the suggested price, and update privileges for $10.
  437.