1multifractal_13 {;  Albrecht Niekamp  Feb.13,2015 - Phoenix update
2;P1      Julia-Manowar-(Lambda)-(Magnet)-(Phoenix) seed
3;RP2 Left: 5 Digit_Channels: (1)shape (2)out (3)ins_1 (4)ins_2 (5)ins_3
4;     Frm: 0_off 1_Secant 2_Mand(2) 3_Bees 4_Jul/Manowar 5_Mmods
5;          6_Phoenix 7_Newton 8_Lambda/Magnet
6;   Right: 2 Digit_ManyMods_Number of sides  2 Digit_Phoen  2 Digit_Lambd
7;          1 Digit_TransReset-Shape: 0_no 1_DblMan 2_Iter 3_both +5_nowarp
8;          4 Digit_TransReset-Ch 2-5: 0_no 1_z 2_Iter 3_both +5_warp
9;IP2 Left: 5 Digit_Bailout Number for Channels 1 to 5
10;   Right: Variables: 4 Digit_Mand/Jul (2var)  2 Digit_Secant 4 Digit_Bees
11;RP3 Left: 2 Digit_Newtonvariable  4 Digits_bailout1
12;   Right: 4 Digit_bailout2 4 Digit_bailout3 1 Digit_Magnet
13;IP3 Left: 4 Digit_Shape:  Warp-factor (fn1 or fn4 is used)
14;   Right: 4 Digit_bailout4 4 Digit_bailout5 1 digit_mow=2 1 digit_mag=2
15;RP4 Left: 4 Digit_Outside:  Warp-factor (fn2 used)
16;   Right: Outside: 4 Digit+fractdig_Border-out 4 Digit+fractdig_border-in
17;IP4 Left: Inside1_Maxiter
18;   Right: Inside1_Transit: 1_maxit 2_borderout 3_borderin +5_maxit+bord
19;          5 Digit_warp factor (fn2 used)  4 Digit+fractaldigit_border1
20;RP5 Left: Inside2_Maxiter
21;   Right: Inside2_Transit: 1_maxit 2_borderout 3_borderin +5_maxit+bord
22;          5 Digit_warp factor (fn3 used)  4 Digit+fractaldigit_border2
23;IP5 Left: Inside3_Maxiter
24;   Right: Inside3_Transit: 1_maxit 2_borderout 3_borderin +5_maxit+bord
25;          5 Digits_Warp factor (fn4 used)  4 Digit+fractaldigit_border3
26;Function: fn1_Manymods fn3_Bees fn2+fn3_Lambda
27z=pixel
28da=real(p2)
29dd=trunc(da)
30tt=dd>0
31da=trunc(((da-dd)*100000000000)+11111)
32dd=trunc(dd+11111)
33d=trunc(dd/10000)
34dd=dd-d*10000
35d3=(d==4)+(d==5)+(d==8)+(d==9)
36d4=d3==0
37vb=d>5
38ex0=(d>1)
39sc=d==2
40bs=d==4
41mo=d==6
42po=d==7
43sx=d==9
44ab=po+(d==3)+(d==5)+(d==9)
45d=trunc(dd/1000)
46dd=dd-d*1000
47ex1=(d>1)
48sc1=d==2
49bs1=d==4
50mo1=d==6
51po1=d==7
52sx1=d==9
53v1m=mo1+po1
54v1j=d>7
55dd1=v1j+(d==4)+(d==5)
56ab1=po1+(d==3)+(d==5)+(d==9)
57d=trunc(dd/100)
58dd=dd-d*100
59ex2=(d>1)
60sc2=d==2
61bs2=d==4
62mo2=d==6
63po2=d==7
64sx2=d==9
65v2m=mo2+po2
66v2j=d>7
67dd2=v2j+(d==4)+(d==5)
68ab2=po2+(d==3)+(d==5)+(d==9)
69d=trunc(dd/10)
70dd=dd-d*10
71ex3=(d>1)
72sc3=d==2
73bs3=d==4
74mo3=d==6
75po3=d==7
76sx3=d==9
77v3m=mo3+po3
78v3j=d>7
79dd3=v3j+(d==4)+(d==5)
80ab3=po3+(d==3)+(d==5)+(d==9)
81d=dd
82ex4=(d>1)
83sc4=d==2
84bs4=d==4
85mo4=d==6
86po4=d==7
87sx4=d==9
88v4m=mo4+po4
89v4j=d>7
90dd4=v4j+(d==4)+(d==5)
91ab4=po4+(d==3)+(d==5)+(d==9)
92bst=bs+bs1+bs2+bs3+bs4
93mot=mo+mo1+mo2+mo3+mo4
94tt=ex1+ex0+ex2+ex3+ex4
95;
96mm=trunc(da/1000000000)
97da=da-mm*1000000000
98ph=trunc(da/10000000)
99da=da-ph*10000000
100sp=trunc(da/100000)
101da=da-sp*100000
102d=trunc(da/10000)
103da=da-d*10000
104wx=(d>4)
105d=d-5*wx
106dm=(d==2)+(d==4)
107ir0=(d==3)+(d==4)
108d=trunc(da/1000)
109da=da-d*1000
110w1=d>4
111d=d-5*w1
112rs1=(d==2)+(d==4)
113ir1=(d==3)+(d==4)
114d=trunc(da/100)
115da=da-d*100
116w2=d>4
117d=d-5*w2
118rs2=(d==2)+(d==4)
119ir2=(d==3)+(d==4)
120d=trunc(da/10)
121da=da-d*10
122w3=d>4
123d=d-5*w3
124rs3=(d==2)+(d==4)
125ir3=(d==3)+(d==4)
126w4=da>4
127da=da-5*w4
128rs4=(da==2)+(da==3)+(da==4)
129if (ph==0)
130ph=p1
131else
132ph=ph/10
133endif
134w0=(wx==0)
135If (1<sp)
136d=(trunc(sp/10))/9
137da=fn4(sp-100*d)
138d=sp/73,37
139sp=d+sqr(-da)
140else
141sp=p1
142endif
143;
144d=real(p3)
145dd=trunc(d)
146da=trunc((d-dd)*10000000000)
147pp=trunc(dd/10000)
148ba1=dd-10000*pp
149ba2=trunc(da/1000000)
150da=da-1000000*ba2
151ba3=trunc(da/100)
152da=da-100*ba3-4
153mg=da/10
154if (mg<1)
155mg=real(p1)
156endif
157;
158d=imag(p3)
159dd=trunc(d)
160da=trunc((d-dd)*10000000000)
161sfac=dd/1000000+(dd==0)
162ba4=trunc(da/1000000)
163da=da-ba4*1000000
164ba5=trunc(da/100)
165da=da-ba5*100
166d=trunc(da/10)
167da=da-d*10
168mow=d==2
169mag=da==2
170px0=((sx*mag)==0)*p1
171px1=((sx1*mag)==0)*p1
172px2=((sx2*mag)==0)*p1
173px3=((sx3*mag)==0)*p1
174px4=((sx4*mag)==0)*p1
175;
176d=real(p4)
177dd=trunc(d)
178da=trunc((d-dd)*10000000000)
179ofac=dd/1000000+(dd==0)
180bh=trunc(da/100000)/10
181bl=(da-bh*1000000)/10
182bs=bl/2
183;
184d=imag(p2)
185dd=trunc(d)
186da=trunc((d-dd)*10000000000)
187d=trunc(dd/10000)
188dd=dd-d*10000
189bb0=ba1*(d==1)+ba2*(d==2)+ba3*(d==3)+ba4*(d==4)+ba5*(d==5)
190d=trunc(dd/1000)
191dd=dd-d*1000
192bb1=ba1*(d==1)+ba2*(d==2)+ba3*(d==3)+ba4*(d==4)+ba5*(d==5)
193d=trunc(dd/100)
194dd=dd-d*100
195bb2=ba1*(d==1)+ba2*(d==2)+ba3*(d==3)+ba4*(d==4)+ba5*(d==5)
196d=trunc(dd/10)
197dd=dd-d*10
198bb3=ba1*(d==1)+ba2*(d==2)+ba3*(d==3)+ba4*(d==4)+ba5*(d==5)
199d=dd
200bb4=ba1*(d==1)+ba2*(d==2)+ba3*(d==3)+ba4*(d==4)+ba5*(d==5)
201;
202d=da
203p0=trunc(d/100000000)/10
204d=d-p0*1000000000
205p6=trunc(d/1000000)/10
206d=d-p6*10000000
207p7=trunc(d/10000)/10
208d=d-p7*100000
209dp=p6+p0/100
210p8=trunc(d/100)/100
211d=d-p8*10000
212p9=d/100
213;
214d=imag(p4)
215mi1=trunc(d)
216da=trunc((d-mi1)*100000000000)
217d=trunc(da/10000000000)
218bt1=d>6
219da=da-d*10000000000
220d=d-5*bt1
221dt1=d>1
222iv1=d==3
223dd=trunc(da/100000)
224da=da-dd*100000
225fac1=dd/1000000+(dd==0)
226bo1=(da/100000)/10
227;
228d=real(p5)
229mi2=trunc(d)
230da=trunc((d-mi2)*100000000000)
231d=trunc(da/10000000000)
232bt2=d>6
233da=da-d*10000000000
234d=d-5*bt2
235dt2=d>1
236iv2=d==3
237dd=trunc(da/100000)
238da=da-dd*100000
239fac2=dd/1000000+(dd==0)
240bo2=(da/100000)/10
241;
242d=imag(p5)
243mi3=trunc(d)
244da=trunc((d-mi3)*100000000000)
245d=trunc(da/10000000000)
246bt3=d>6
247da=da-d*10000000000
248d=d-5*bt3
249dt3=d>1
250iv3=(d==3)
251dd=trunc(da/100000)
252da=da-dd*100000
253fac3=dd/1000000+(dd==0)
254bo3=(da/100000)/10
255;
256if (vb)
257if (d3)
258if (ab)
259if (mag)
260c=z
261z=pixel
262x=mg
263x=x+(x==0)*3      ;magnet
264else
265z=pixel           ;lambdafn
266x=((1,0.4)*(|sp|<=0)+sp)
267m=(64*(real(bb0)<=0)+real(bb0)*(0<bb0))
268endif
269else
270c=z
271z=pixel           ;newton
272endif
273elseif (ab)
274c=z               ;Phoenix
275z=pixel
276else
277c=0.4*log(sqr(z^mm))
278z=0               ;many mods
279endif
280elseif (d3)
281if (ab)
282if (mow)          ;manowar
283mt=(4*(real(p2)<=0)+real(p2)*(0<p2) )
284c=p1
285z=pixel
286else
287c=p1              ;Julia
288z=pixel
289endif
290else              ;bees
291c=p1
292z=pixel
293endif
294elseif (ab)
295c=z               ;Mandel
296z=0
297else
298c=z               ;Secant
299z=pixel
300endif
301t=0
302bo=|z|
303p=pp
304z0=p7
305zold=(0.0,0.0)
306cb=p9
307ba=bb0
308:
309if (tt>0)
310t=t+1
311if (ex0)
312ex0=t<mi1
313if (bo>bs)
314if (mot)
315u0=fn4(t*sfac)
316else
317u0=fn1(t*sfac)
318endif
319if (w0)
320u=u0
321else
322u=1.0
323endif
324ex0=0
325if (ir0)
326t=0
327endif
328if (d3)
329z=pixel
330cb=p9*u
331c=px0*u
332p=pp*u
333x=x*u
334else
335z=z*u
336if (mo)
337c=0.4*log(sqr(z^mm))
338else
339c=pixel
340endif
341tt=tt-1+ex0
342endif
343endif
344elseif ((ex1)&&bo>bl)
345if (bo<bh)
346d3=dd1
347ba=bb1
348ab=ab1
349ex1=0
350tt=tt-1
351if (w1)
352u=fn2(t*ofac)
353else
354u=1.0
355endif
356if (ir1)
357t=0
358endif
359if (d3)
360vb=v1j
361if (rs1)
362z=pixel
363cb=p9*u
364c=px1*u
365p=pp*u
366x=x*u
367else
368c=px1
369z=z*u
370cb=p9
371endif
372else
373vb=v1m
374if (rs1)
375c=z*u
376z=pixel*(sc1+po1)
377z0=p7*u
378ph=ph*u
379else
380c=z
381z=z*u
382endif
383if (mo1)
384c=0.4*log(sqr(z^mm))
385endif
386endif
387endif
388elseif (ex2)
389if (dt1)
390if (iv1)
391d=bo>bo1
392else
393d=bo<bo1
394endif
395if (bt1)
396d=d+(t>mi1)
397endif
398else
399d=t>mi1
400endif
401if (d)
402ab=ab2
403d3=dd2
404ba=bb2
405ex2=0
406tt=tt-1
407if (w2)
408u=fn2(t*fac1)
409else
410u=1.0
411endif
412if (ir2)
413t=0
414endif
415if (d3)
416vb=v2j
417if (rs2)
418z=pixel
419cb=p9*u
420c=px2*u
421p=pp*u
422x=x*u
423else
424cb=p9
425c=px2
426z=z*u
427endif
428else
429vb=v2m
430if (rs2)
431c=z*u
432z=pixel*(sc2+po2)
433z0=p7*u
434ph=ph*u
435else
436c=z
437z=z*u
438endif
439if (mo2)
440c=0.4*log(sqr(z^mm))
441endif
442endif
443endif
444elseif (ex3)
445if (dt2)
446if (iv2)
447d=bo>bo2
448else
449d=bo<bo2
450endif
451if (bt2)
452d=d+(t>mi2)
453endif
454else
455d=t>mi2
456endif
457if (d)
458ab=ab3
459d3=dd3
460ba=bb3
461ex3=0
462tt=tt-1
463if (w3)
464If (bst)
465u=fn2(t*fac2)
466else
467u=fn3(t*fac2)
468endif
469else
470u=1.0
471endif
472if (ir3)
473t=0
474endif
475if (d3)
476vb=v3j
477if (rs3)
478z=pixel
479cb=p9*u
480c=px3*u
481p=pp*u
482x=x*u
483else
484cb=p9
485c=px3
486z=z*u
487endif
488else
489vb=v3m
490if (rs3)
491c=z*u
492z=pixel*(sc3+po3)
493z0=p7*u
494ph=ph*u
495else
496c=z
497z=z*u
498endif
499vb=v3m
500if (mo3)
501c=0.4*log(sqr(z^mm))
502endif
503endif
504endif
505elseif (ex4)
506if (dt3)
507if (iv3)
508d=bo>bo3
509else
510d=bo<bo3
511endif
512if (bt3)
513d=d+(t>mi3)
514endif
515else
516d=t>mi3
517endif
518if (d)
519ab=ab4
520d3=dd4
521ba=bb4
522ex4=0
523tt=0
524if (w4)
525u=fn4(t*fac3)
526else
527u=1.0
528endif
529if (d3)
530vb=v4j
531if (rs4)
532z=pixel
533cb=p9*u
534c=px4*u
535p=pp*u
536x=x*u
537else
538cb=p9
539c=px4
540z=z*u
541endif
542else
543vb=v4m
544if (rs4)
545c=z*u
546z=pixel*(sc4+po4)
547z0=p7*u
548ph=ph*u
549else
550c=z
551z=z*u
552endif
553if (mo4)
554c=0.4*log(sqr(z^mm))
555endif
556endif
557endif
558endif
559endif
560if (vb)
561if (d3)
562if (ab)
563if (mag)     ;magnet
564z=((z^x+c-1)/(2*z+c-2))^(x-1)
565else
566z=fn2(z)*fn3(x)     ;Lambdafn
567abs(imag(z))<=x && abs(real(z))<=m
568endif
569else
570z1=z^p-1     ;newton
571z2=p*z*z
572z=z-z1/z2
573endif
574elseif (ab)
575z1=z*z+0.56+ph/100-0.5*zold
576zold=z       ;Phoenix
577z=z1
578else
579z2=fn1(z)+c  ;Many_mods
580z1=cos(z2)
581z=c*(1-z1)/(1+z1)
582endif
583elseif (d3)
584if (ab)
585if (mow)
586z1=z         ;manowar
587oldz=z
588z=sqr(oldz)+z1+c
589z1=oldz
590else          ;Julia
591z=z2*z2+p6*z2+c-p0
592endif
593else
594z1=fn3(z)-cb   ;Bees
595z2=z1^p8-1
596z3=p8*(z1^(p8-1))
597z=z-(z2/z3)
598endif
599elseif (ab)
600if (dm)
601z=z*z+c+c*c-dp  ;Double Mandel
602else
603z2=z*z          ;Mandel
604z=z2*z2+p6*z2+c-p0
605endif
606else
607z3=z            ;Secant
608z1=z0*z0*z0*z0-1
609z2=z*z*z*z-1
610z=z-z2*(z-z0)/(z2-z1)
611z0=z3
612endif
613bo=|z|
614bo<ba
615}
616