home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / e / e004 / 1.img / FRACTAL.MCD < prev    next >
Encoding:
Text File  |  1987-10-23  |  2.2 KB  |  92 lines

  1. .MCD 20000 0
  2. .CMD PLOTFORMAT logs=0,0 subdivs=1,1 size=5,15 type=l
  3. .CMD FORMAT  rd=d ct=10 im=i et=3 zt=15 pr=3 mass length time charge
  4. .CMD SET ORIGIN 0
  5. .CMD SET TOL 0.001000
  6. .CMD MARGIN 0
  7. .CMD LINELENGTH 78
  8. .CMD SET PRNCOLWIDTH 8
  9. .CMD SET PRNPRECISION 4
  10. .TXT 1 0 1 30 
  11. a1,29,27,28
  12. SELF-SQUARED FRACTAL CURVES
  13. .TXT 2 0 3 76 
  14. a3,75,73,170
  15. For further information on these curves, see Mandelbrot, "The Fractal     
  16. Geometry of Nature" (chapter 19), and Peitgen & Richter, "The Beauty of 
  17. Fractals" (chapter 2)
  18. .TXT 4 0 3 77 
  19. a3,76,74,202
  20. Self squared curves are curves in the complex plane which remain invariant 
  21. under quadratic transformation. We examine the problem of iterates of
  22. the functions f(x) = x^2 + µ, or f(x) = ▐ * x * (1-x).
  23. .TXT 4 0 1 67 
  24. a1,66,64,65
  25. The following examples are computed by direct inverse iteration.
  26. .TXT 2 0 2 75 
  27. a2,74,72,117
  28. First define a function that allows a random choice between two possible 
  29. inverses for a quadratic function. To wit:
  30. .EQN 3 1 1 31 
  31. pick(x)~2*floor(rnd(2))-1
  32. .TXT 0 35 1 20 
  33. a1,19,17,18
  34. returns +1 or -1.
  35. .TXT 3 -36 1 35 
  36. a1,35,33,34
  37. Calculate based on this function:
  38. .EQN 0 43 2 17 
  39. f(x):x^2+µ
  40. .TXT 2 -43 1 71 
  41. a1,70,68,69
  42. Now pick a value for µ. (Change the value of µ to see other curves.)
  43. .EQN 2 1 1 20 
  44. µ:0.31+0.4*1i
  45. .EQN 3 0 1 17 
  46. transient:10
  47. .TXT 0 24 2 43 
  48. a2,42,40,69
  49. (detail of curve is directly  
  50. proportional to number of iterations)
  51. .EQN 1 -24 1 19 
  52. iterations:250
  53. .EQN 2 0 1 33 
  54. i:1;transient+iterations
  55. .EQN 2 0 2 9 
  56. x[1:0
  57. .EQN 3 0 3 25 
  58. x[(i+1):pick(1)*\(x[i-µ)
  59. .EQN 5 -1 1 29 
  60. i:transient;iterations
  61. .EQN 0 34 1 15 
  62. xscale:1.2
  63. .EQN 1 0 1 16 
  64. yscale:0.75
  65. .EQN 2 -34 17 50 
  66. yscale/|µ&-yscale/|µ&Im(x[i){1,1,15,40,d}@xscale&-xscale&Re(x[i)
  67. .TXT 19 0 1 34 
  68. a1,33,36,32
  69. Now an example with the ▐ form:
  70. .EQN 0 41 1 22 
  71. f(x):▐*x*(1-x)
  72. .EQN 2 -40 1 8 
  73. ▐:3
  74. .EQN 2 0 1 35 
  75. i:1;(transient+iterations)
  76. .EQN 2 0 2 9 
  77. x[i:0
  78. .EQN 3 0 7 31 
  79. x[(i+1):(1+pick(1)*\(1-(4*x[i)/▐))/2
  80. .EQN 9 0 1 29 
  81. i:transient;iterations
  82. .EQN 0 39 1 15 
  83. xscale:1.1
  84. .EQN 1 0 1 15 
  85. yscale:1.0
  86. .EQN 2 -39 17 49 
  87. &&Im(x[i){1,1,15,40,d}@&&Re(x[i)
  88. .TXT 30 28 2 26 
  89. a2,25,49,41
  90. Based on a document by
  91. Seth Finkelstein
  92.