home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 November / Chip_2001-11_cd1.bin / sharewar / chaospro / cpro302.exe / FRACMOD.CFM < prev    next >
Encoding:
Text File  |  2000-04-10  |  4.9 KB  |  274 lines

  1. bills_xy-trade4  {// modified for UF by Sylvie Gallet
  2. complex a;
  3. parameter complex p1;
  4. complex b;
  5. complex c;
  6. parameter complex p2;
  7. complex d;
  8. complex g;
  9. parameter complex p3;
  10. complex f;
  11. complex zold;
  12. complex Var_x;
  13. complex Var_y;
  14.   
  15.     void init(void)
  16.     {
  17.         a = real(p1);
  18.         b = imag(p1);
  19.         c = real(p2);
  20.         d = imag(p2);
  21.         g = real(p3);
  22.         f = imag(p3);
  23.         z = pixel+1/pixel;
  24.         zold = pixel^g;
  25.     }
  26.     void loop(void)
  27.     {
  28.         Var_x = (real(z)-real(zold))^a;
  29.         Var_y = (imag(z)-imag(zold))^b;
  30.         zold = z;
  31.         z = (Var_y +flip(Var_x));
  32.         z = (fn1(z))^c - (fn2(zold))^d;
  33.     }
  34.     bool bailout(void)
  35.     {
  36.         return(|z| < f);
  37.     }
  38.     //SOURCE: decker.par
  39. }
  40.  
  41.  
  42. Carr2821a { // Modified Sylvie Gallet frm. [101324,3444],1996
  43.             // Modified for IF..ELSE logic by Sylvie Gallet, March 1997
  44.             // Optimized by Sylvie Gallet, April 1997
  45. complex ee;
  46. complex c;
  47. complex r;
  48. complex k;
  49. complex p;
  50. complex bailout;
  51. complex im1;
  52. parameter complex p1;
  53. complex im2;
  54. parameter complex p2;
  55. complex iter;
  56.    
  57.     void init(void)
  58.     {
  59.         ee = -0.1/pixel;
  60.         z = c = conj(ee) + pixel;
  61.         r = |z|;
  62.         k = ee*0.9;
  63.         p = k + flip(ee) + conj(0.01*ee) + pixel;
  64.         bailout = 16;
  65.         im1 = imag(p1);
  66.         im2 = imag(p2);
  67.         iter = 0;
  68.     }
  69.     void loop(void)
  70.     {
  71.         if  ((iter == real(p1)))
  72.         {
  73.             p = (c^1.2)*1.5 + k;
  74.             r = z = 0;
  75.         }
  76.         else if  ((iter == im1))
  77.         {
  78.             p = conj(c)*2.25 + k;
  79.             r = z = 0;
  80.         }
  81.         else if  ((iter == real(p2)))
  82.         {
  83.             p = flip(c)*3.375 + k;
  84.             r = z = 0;
  85.         }
  86.         else if  ((iter == im2))
  87.         {
  88.             p = flip(c)*5.0625 + k;
  89.             r = z = 0;
  90.         }
  91.         iter = iter + 1;
  92.         z = real(r)*0.2 + sqr(z) + p;
  93.         r = |z|;
  94.     }
  95.     bool bailout(void)
  96.     {
  97.         return(r <= bailout);
  98.     }
  99.     //SOURCE: lskinner.frm
  100. }
  101.  
  102.  
  103. Carr2821b { // Modified Sylvie Gallet frm. [101324,3444],1996
  104.             // Modified for IF..ELSE logic by Sylvie Gallet, March 1997
  105.             // Optimized by Sylvie Gallet, April 1997
  106. complex ee;
  107. complex c;
  108. complex r;
  109. complex k;
  110. complex p;
  111. complex bailout;
  112. complex im1;
  113. parameter complex p1;
  114. complex im2;
  115. parameter complex p2;
  116. complex iter;
  117.    
  118.     void init(void)
  119.     {
  120.         ee = 0.1/pixel;
  121.         z = c = conj(ee) - pixel;
  122.         r = |z|;
  123.         k = ee*(-0.9);
  124.         p = k + flip(ee) + conj(0.01*ee) - pixel;
  125.         bailout = 16;
  126.         im1 = imag(p1);
  127.         im2 = imag(p2);
  128.         iter = 0;
  129.     }
  130.     void loop(void)
  131.     {
  132.         if  ((iter == real(p1)))
  133.         {
  134.             p = (c^1.2)*1.5 + k;
  135.             r = z = 0;
  136.         }
  137.         else if  ((iter == im1))
  138.         {
  139.             p = conj(c)*2.25 + k;
  140.             r = z = 0;
  141.         }
  142.         else if  ((iter == real(p2)))
  143.         {
  144.             p = flip(c)*3.375 + k;
  145.             r = z = 0;
  146.         }
  147.         else if  ((iter == im2))
  148.         {
  149.             p = flip(c)*5.0625 + k;
  150.             r = z = 0;
  151.         }
  152.         iter = iter + 1;
  153.         z = real(r)*0.2 + sqr(z) + p;
  154.         r = |z|;
  155.     }
  156.     bool bailout(void)
  157.     {
  158.         return(r <= bailout);
  159.     }
  160.     //SOURCE: lskinner.frm
  161. }
  162.  
  163.  
  164. general_jul-2lines {
  165.   //
  166.   // "2 general lines" coloring method for Julia sets
  167.   // c = Julia parameter, hardcoded
  168.   // real(p1) = x-line a
  169.   // imag(p1) = x-line b
  170.   // real(p2) = x-line c
  171.   // imag(p2) = y-line a
  172.   // real(p3) = y-line b
  173.   // imag(p3) = y-line c
  174.   // bailout hardcoded to 10^12
  175.   // use "decomp=256" coloring
  176.   //
  177.   // Original Fractint formula by Kerry Mitchell, 26 Aug 98
  178.   // Modified for UF by Ken Childress, 02 Nov 99
  179.   //
  180. complex zc;
  181. complex c;
  182. parameter complex juliacoords;
  183. complex rmin;
  184. complex ax;
  185. parameter complex linea;
  186. complex bx;
  187. parameter complex lineb;
  188. complex cx;
  189. parameter complex linec;
  190. complex ay;
  191. complex by;
  192. complex cy;
  193. complex Var_x;
  194. complex Var_y;
  195. complex tempx;
  196. complex tempy;
  197. complex temp;
  198. complex r;
  199. parameter real bailout;
  200.  
  201.     void init(void)
  202.     {
  203.         zc = pixel;
  204.         c = juliacoords;
  205.         rmin = 1.0e12;
  206.         ax = real(linea);
  207.         bx = real(lineb);
  208.         cx = real(linec);
  209.         ay = imag(linea);
  210.         by = imag(lineb);
  211.         cy = imag(linec);
  212.  
  213.     }
  214.     void loop(void)
  215.     {
  216.         zc = sqr(zc) + c;
  217.         Var_x = real(zc);
  218.         Var_y = imag(zc);
  219.         tempx = ax * Var_x + bx * Var_y + cx;
  220.         tempy = ay * Var_x + by * Var_y + cy;
  221.         temp = tempx + flip(tempy);
  222.         r = |temp|;
  223.  
  224.         if  ((r < rmin))
  225.         {
  226.             rmin = r;
  227.             z = temp;
  228.         }
  229.  
  230.     }
  231.     bool bailout(void)
  232.     {
  233.         return(|zc| < bailout);
  234.     }
  235.     void description(void)
  236.     {
  237.         this.title = "Julia - 2 General Lines";
  238.         this.periodicity = 0;
  239.         this.maxiter = 1000;
  240.  
  241.    
  242.         juliacoords.caption = "Julia Seed";
  243.         juliacoords.default = (0.26, 0.0014);
  244.         juliacoords.hint = "Julia seed value.";
  245.   
  246.  
  247.    
  248.         linea.caption = "Line A";
  249.         linea.default = (0.0, 0.0);
  250.         linea.hint = "Real = Line A x-value, Imag = Line A y-value";
  251.   
  252.  
  253.    
  254.         lineb.caption = "Line B";
  255.         lineb.default = (1.0, 0.0);
  256.         lineb.hint = "Real = Line B x-value, Imag = Line B y-value";
  257.   
  258.  
  259.    
  260.         linec.caption = "Line C";
  261.         linec.default = (1.0, 1.0);
  262.         linec.hint = "Real = Line C x-value, Imag = Line C y-value";
  263.   
  264.  
  265.    
  266.         bailout.caption = "Bailout Value";
  267.         bailout.default = 1.0e12;
  268.         bailout.hint = "The bailout value.";
  269.   
  270.     }
  271. }
  272.  
  273.  
  274.