Mand_Basic.html
• Go back to Mandelbrot_Stuff
• ! Mandelbrot Program 'MAND2.BAS' update by dac 06-May-2011
• ! 18-Apr-2011 install cursor Xc & Yc pick 19-Apr-11 install N to 10
• <
• GOSUB Init
• Keyloop1:!
• ON KEY 1 LABEL " X & Y Input " GOSUB Input
• ON KEY 2 LABEL " Raster " GOSUB Raster
• ON KEY 3 LABEL Sel_pic1\$ GOSUB Gstore_show
• ON KEY 4 LABEL " MAKE GIF " GOSUB Make_gif
• ON KEY 5 LABEL " " GOSUB Null
• ON KEY 7 LABEL " " GOSUB Null
• ON KEY 8 LABEL " GOTO 2nd Menu" GOTO Keyloop2
• GOTO Keyloop1
• Null: RETURN
• Keyloop2:!
• ON KEY 1 LABEL Sf\$ GOSUB Save_file
• ON KEY 2 LABEL "DO MOVIE " GOSUB Do_movie
• ON KEY 3 LABEL Sho\$ GOSUB Do_movie_sho
• ON KEY 4 LABEL Kbd_toggle\$ GOSUB Kbd_toggle
• ON KEY 5 LABEL " PRINT COEFF " GOSUB Pascal
• ON KEY 6 LABEL Pat\$ GOSUB Prt_area_toggle
• ON KEY 7 LABEL " " GOSUB Null
• ON KEY 8 LABEL " GOTO HomeMenu" GOTO Keyloop1
• GOTO Keyloop2
• Prt_area_toggle:!
• IF Pat=0 THEN
• Pat=1
• Pat\$="PRT AREA ON "
• RETURN
• ELSE
• Pat=0
• Pat\$="PRT AREA OFF "
• END IF
• RETURN
• Pascal:!
• I=1
• OUTPUT 2;Exp;
• INPUT "Input Exponent (N) for Pascals Coefficients",Exp
• FOR N=1 TO Exp
• I=I+1
• Pas(N,1)=1
• Pas(N,I)=1
• NEXT N
• PRINT
• PRINT
• FOR N=2 TO Exp
• FOR J=2 TO N
• Pas(N,J)=Pas(N-1,J-1)+Pas(N-1,J)
• NEXT J
• IF N=Exp THEN PRINT N;"#";Pas(N,1);Pas(N,2);Pas(N,3);Pas(N,4);Pas(N,5);Pas(N,6);Pas(N,7);Pas(N,8);Pas(N,9);Pas(N,10);Pas(N,11);Pas(N,12);Pas(N,13);Pas(N,14);Pas(N,15)
• NEXT N
• RETURN
• Kbd_toggle:!
• IF Kbt=0 THEN
• Kbt=1
• GOTO J700
• END IF
• IF Kbt=1 THEN
• Kbt=0
• GOTO J700
• END IF
• J700: IF Kbt=0 THEN
• Kbd_toggle\$="KEY-TRAP OFF "
• OFF KBD
• ELSE
• Kbd_toggle\$="KEY-TRAP ON "
• ON KBD GOSUB In_key
• END IF
• RETURN
• In_key:!
• K\$=KBD\$
• IF K\$[1;1]=CHR\$(255) THEN ! 2-Byte Key
• ! CONTROL 1;1,19
• ! PRINT "2nd Byte "&K\$[2;1]
• GOSUB Decode
• ELSE
• ! CONTROL 1;1,17
• ! PRINT K\$[1;1],NUM(K\$)
• GOSUB Decode
• END IF
• RETURN
• Decode:!
• IF K\$[2;1]="<" THEN ! X-Decrement
• Xc=Xc-Xrange/Xpic/Mag
• GOSUB Draw
• DISP Xc;Yc
• END IF
• IF K\$[2;1]=">" THEN ! X-Increment
• Xc=Xc+Xrange/Xpic/Mag
• GOSUB Draw
• DISP Xc;Yc
• END IF
• IF K\$[2;1]="V" THEN ! Y-Decrement
• Yc=Yc-Yrange/Ypic/Mag
• GOSUB Draw
• DISP Xc;Yc
• END IF
• IF K\$[2;1]="^" THEN ! Y-Increment
• Yc=Yc+Yrange/Ypic/Mag
• GOSUB Draw
• DISP Xc;Yc
• END IF
• RETURN
• Draw:!
• PEN 3
• MOVE Xc-.02*Xrange/Mag,Yc
• DRAW Xc+.02*Xrange/Mag,Yc
• MOVE Xc,Yc-.02*Yrange/Mag
• DRAW Xc,Yc+.02*Yrange/Mag
• Xcl=Xc
• Ycl=Yc
• RETURN
• Gstore_show:!
• Psel=Psel+1
• Pn=(Psel MOD 24)+1
• Sel_pic1\$="SELECTED "&VAL\$(Pi)&" "
• RETURN
• Raster:!
• GOSUB Ginit
• Err_cnt=0! Set Overflow err cnt to zero
• Xinc=Xrange/Xpic/Mag
• Yinc=Yrange/Ypic/Mag
• Apic=0
• ! GOTO Jmp1 ! Enable this GOTO to skip MB Plot to adjust graphics to text alignment
• FOR Y=Yb TO Yt STEP Yinc ! X & iY are the coord of points tested
• FOR X=Xl TO Xr STEP Xinc ! REAL
• M=0
• I=0! Imaginary
• R=0! Real
• GOSUB Mbrot
• Penn=(Cnt/K MOD 61)+1
• IF Penn=8 THEN Penn=9
• IF Penn=16 THEN Penn=17
• PEN Penn
• IF Cnt=Tries THEN PEN -1! Paint Black if (Xc,Yc) is stable
• IF Cnt=Tries THEN Apic=Apic+1
• MOVE X,Y
• DRAW X,Y
• NEXT X
• NEXT Y
• Area=Apic*Xrange*Yrange/Xpic/Ypic/Mag/Mag
• Jmp1: GOSUB Post_plot_info
• GSTORE P0(*)! Save image for Xc-Yc move locator
• RETURN
• Mbrot:! Z
• ! Boost=INT(Mag^.15) ! increase tries as magnification increases
• Cnt=0
• WHILE M
• Cnt=Cnt+1
• R=R+X
• I=I+Y
• IF ABS(R)<1.E-14 THEN R=0
• IF ABS(I)<1.E-14 THEN I=0
• IF N=2 THEN ! Pascal's: 1 2 1
• Rtemp=+R*R-I*I! Real part of quotent ! 2 terms
• Itemp=+2*R*I! Imag part of quotent ! 1 term
• END IF
• IF N=3 THEN ! Pascal's: 1 3 3 1
• Rtemp=+R^3-3*R*I^2 ! 2 terms
• Itemp=+3*R^2*I-I^3 ! 2 terms
• END IF
• IF N=4 THEN ! Pascal's: 1 4 6 4 1
• Rtemp=+R^4-6*R^2*I^2+I^4 ! 3 terms
• Itemp=+4*R^3*I-4*R*I^3 ! 2 terms
• END IF
• IF N=5 THEN ! Pascal's: 1 5 10 10 5 1
• Rtemp=+R^5-10*R^3*I^2+5*R*I^4 ! 3 terms
• Itemp=+5*R^4*I-10*R^2*I^3+I^5 ! 3 terms
• END IF
• IF N=6 THEN ! Pascal's: 1 6 15 20 15 6 1
• Rtemp=+R^6-15*R^4*I^2+15*R^2*I^4-I^6 ! 4 terms
• Itemp=+6*R^5*I-20*R^3*I^3+6*R*I^5 ! 3 terms
• END IF
• IF N=7 THEN ! Pascal's: 1 7 21 35 35 21 7 1
• Rtemp=+R^7-21*R^5*I^2+35*R^3*I^4-7*R*I^6 ! 4 terms
• Itemp=+7*R^6*I-35*R^4*I^3+21*R^2*I^5-I^7 ! 4 terms
• END IF
• IF N=8 THEN ! Pascal's: 1 8 28 56 70 56 28 8 1
• Rtemp=+R^8-28*R^6*I^2+70*R^4*I^4-28*R^2*I^6+I^8 ! 5 terms
• Itemp=+8*R^7*I-56*R^5*I^3+56*R^3*I^5-8*R*I^7 ! 4 terms
• END IF
• IF N=9 THEN ! Pascal's: 1 9 36 84 126 126 84 36 9 1
• Rtemp=+R^9-36*R^7*I^2+126*R^5*I^4-84*R^3*I^6+9*R*I^8! 5 terms
• Itemp=+9*R^8*I-84*R^6*I^3+126*R^4*I^5-36*R^2*I^7+I^9! 5 terms
• END IF
• IF N=10 THEN ! Pascal's: 1 10 45 120 210 252 210 120 45 10 1
• Rtemp=+R^10-45*R^8*I^2+210*R^6*I^4-210*R^4*I^6+45*R^2*I^8-I^10! 6 t
• Itemp=+10*R^9*I-120*R^7*I^3+252*R^5*I^5-120*R^3*I^7+10*R*I^9! 5 t
• ! Rtemp=+R^10-45*R^8*I^2+210*R^6*I^4-210*R^4*I^6+45*R^2*I^8-I^10 ! 6 t
• ! Itemp=+10*R^9*I-120*R^7*I^3+252*R^5*I^5-120*R^3*I^7+45*R*I^9 ! 5 t
• END IF
• IF N=11 THEN ! Pascal's: 1 11 55 165 330 462 462 330 165 55 11 1
• Rtemp=+R^11-55*R^9*I^2+330*R^7*I^4-462*R^5*I^6+165*R^3*I^8-11*R*I^10
• Itemp=+11*R^10*I-165*R^8*I^3+462*R^6*I^5-330*R^4*I^7+55*R^2*I^9-I^11
• END IF
• IF N=12 THEN ! Pascal's: 1 12 66 220 495 792 924 792 495 220 66 12 1
• Rtemp=+R^12-66*R^10*I^2+495*R^8*I^4-924*R^6*I^6+495*R^4*I^8-66*R^2*I^10+I^12
• Itemp=+12*R^11*I-220*R^9*I^3+792*R^7*I^5-792*R^5*I^7+220*R^3*I^9-12*R*I^11
• END IF
• IF N=13 THEN ! Pascal's: 1 13 78 286 715 1287 1716 1716 1287 715 286 78 13 1
• Rtemp=+R^13-78*R^11*I^2+715*R^9*I^4-1716*R^7*I^6+1287*R^5*I^8-286*R^3*I^10+13*R*I^12
• Itemp=+13*R^12*I-286*R^10*I^3+1287*R^8*I^5-1716*R^6*I^7+715*R^4*I^9-78*R^2*I^11+I^13
• END IF
• IF N=14 THEN ! Pascal's: 1 14 91 364 1001 2002 3003 3432 3003 2002 1001 364 91 14 1
• Rtemp=+R^14-91*R^12*I^2+1001*R^10*I^4-3003*R^8*I^6+3003*R^6*I^8-1001*R^4*I^10+91*R^2*I^12-I^14
• Itemp=+14*R^13*I-364*R^11*I^3+2002*R^9*I^5-3432*R^7*I^7+2002*R^5*I^9-364*R^3*I^11+14*R*I^13
• END IF
• IF N=15 THEN ! 1 15 105 455 1365 3003 5005 6435 6435 5005 3003 1365 455 105 15 1 ! R7t, I6t
• Rtemp=+R^15-105*R^13*I^2+1365*R^11*I^4-5005*R^9*I^6+6435*R^7*I^8-3003*R^5*I^10+455*R^3*I^12-15*R*I^14
• Itemp=+15*R^14*I-455*R^12*I^3+3003*R^10*I^5-6435*R^8*I^7+5005*R^6*I^9-1365*R^4*I^11+105*R^2*I^13-I^15
• END IF
• IF N=16 THEN ! 1 16 120 560 1820 4368 8008 11440 12870 11440 8008 4368 1820 560 120 16 1 !
• Rtemp=+R^16-120*R^14*I^2+1820*R^12*I^4-8008*R^10*I^6+12870*R^8*I^8-8008*R^6*I^10+1820*R^4*I^12-120*R^2*I^14+I^16
• Itemp=+16*R^15*I-560*R^13*I^3+4368*R^11*I^5-11440*R^9*I^7+11440*R^7*I^9-4368*R^5*I^11+560*R^3*I^13-16*R*I^15
• END IF
• IF N=17 THEN ! 1 17 136 680 2380 6188 12376 19448 24310 24310 19448 12376 6188 2380 680 136 17 1 !
• Rtemp=+R^17-136*R^15*I^2+2380*R^13*I^4-12376*R^11*I^6+24310*R^9*I^8-19448*R^7*I^10+6188*R^5*I^12-680*R^3*I^14+17*R*I^16
• Itemp=+17*R^16*I-680*R^14*I^3+6188*R^12*I^5-19448*R^10*I^7+24310*R^8*I^9-12376*R^6*I^11+2380*R^4*I^13-136*R^2*I^15+I^17
• END IF
• IF N=18 THEN ! 1 18 153 816 3060 8568 18564 31824 43758 48620 43758 31824 18564 8568 3060 816 153 18 1 !
• Rtemp=+R^18-153*R^16*I^2+3060*R^14*I^4-18564*R^12*I^6+43758*R^10*I^8-43758*R^8*I^10+18564*R^6*I^12-3060*R^4*I^14+153*R^2*I^16-I^18
• Itemp=+18*R^17*I-816*R^15*I^3+8568*R^13*I^5-31824*R^11*I^7+48620*R^9*I^9-31824*R^7*I^11+8568*R^5*I^13-816*R^3*I^15+18*R*I^17
• END IF
• IF N=19 THEN ! 1 19 171 969 3876 11628 27132 50388 75582 92378 92378 75582 50388 27132 11628 3876 969 171 19 1
• Rtemp=+R^19-171*R^17*I^2+3876*R^15*I^4-27132*R^13*I^6+75582*R^11*I^8-92378*R^9*I^10+50388*R^7*I^12-11628*R^5*I^14+969*R^3*I^16-19*R*I^18
• Itemp=+19*R^18*I-969*R^16*I^3+11628*R^14*I^5-50388*R^12*I^7+92378*R^10*I^9-75582*R^8*I^11+27132*R^6*I^13-3876*R^4*I^15+171*R^2*I^17-I^19
• ! ! Wrong but interesting
• ! Rtemp=+R^19-171*R^17*I^2+3876*R^15*I^4-27132*R^13*I^6+75582*R^11*I^8-92378*R^9*I^10+50388*R^7*I^12-11628*R^5*I^14+969*R^3*I^16-19*R*I^18
• ! Itemp=+19*R^18*I-969*R^16*I^3+11628*R^14*I^5-50388*R^12*I^7+92378*R^10*I^9-75582*R^8*I^11+27132*R^6*I^13-3876*R^4*I^15+969*R^2*I^17-19*I^19
• END IF
• IF N=20 THEN ! 1 20 191 1140 4845 15504 38760 77520 125970 167960 184756 167960 125970 77520 38760 15504 4845 1140 191 20 1
• Rtemp=+R^20-191*R^18*I^2+4845*R^16*I^4-38760*R^14*I^6+125970*R^12*I^8-184756*R^10*I^10+125970*R^8*I^12-38760*R^6*I^14+4845*R^4*I^16-191*R^2*I^18+I^20
• Itemp=+20*R^19*I-1140*R^17*I^3+15504*R^15*I^5-77520*R^13*I^7+167960*R^11*I^9-167960*R^9*I^11+77520*R^7*I^13-15504*R^5*I^15+1140*R^3*I^17-20*R*I^19
• END IF
• IF N=21 THEN ! 1 21 210 1330 5985 20349 54264 116280 203490 293930 352716 352716 293930 203490 116280 54264 20349 5985 1330 210 21 1
• Rtemp=+R^21-210*R^19*I^2+5985*R^17*I^4-54264*R^15*I^6+203490*R^13*I^8-352716*R^11*I^10+293930*R^9*I^12-116280*R^7*I^14+20349*R^5*I^16-1330*R^3*I^18+21*R*I^20
• Itemp=+21*R^20*I-1330*R^18*I^3+20349*R^16*I^5-116280*R^14*I^7+293930*R^12*I^9-352716*R^10*I^11+203490*R^8*I^13-54264*R^6*I^15+5985*R^4*I^17-210*R^2*I^19+I^21
• END IF
• R=Rtemp
• I=Itemp
• IF Orb>0 AND I>Ylast AND Mag=1 THEN
• MOVE R,I
• DRAW R,I
• END IF
• IF ABS(R)<1.E-150 THEN R=0! Try to prevent REAL Underflow
• IF ABS(I)<1.E-150 THEN I=0! remove ABS to get starburst plot
• M=R*R+I*I
• Xlast=X
• Ylast=Y
• IF M>Rlimit THEN 2740
• IF Cnt>=Tries THEN 2740
• END WHILE
• J2740: IF Pat=1 THEN ! Print Area in Figure
• CONTROL 1;16,8
• PRINT "AREA: "&VAL\$(DROUND(2.71354,5))
• END IF
• RETURN
• Orbit:!
• Orb=-Orb
• IF Orb>0 THEN Orbit\$=" Orbits On "
• IF Orb<0 THEN Orbit\$=" Orbits Off "
• IF Orb<0 THEN
• RETURN
• PEN -1
• FOR Ye=I-Yinc TO Yt STEP Yinc
• MOVE Xl,Ye
• DRAW X,Ye
• NEXT Ye
• END IF
• PEN 2
• FRAME
• PEN 1
• RETURN
• Post_plot_info:!
• AREA PEN 0
• PEN 2
• MOVE Xl+.02*Xrange/Mag,Yb
• RECTANGLE .46*Xrange/Mag,.076*Yrange/Mag,FILL,EDGE
• CONTROL 1;2,15
• PRINT "Mag:"&VAL\$(Mag)
• MOVE Xl+.69*Xrange/Mag,Yb
• RECTANGLE .29*Xrange/Mag,.076*Yrange/Mag,FILL,EDGE
• CONTROL 1;29,15
• PRINT "Tries:"&VAL\$(Tries)
• IF N>2 THEN
• CONTROL 1;15,15
• PRINT "N:"&VAL\$(N)
• ELSE
• CONTROL 1;15,15
• PRINT "K:";&VAL\$(K)
• END IF
• MOVE Xl+Xrange*.28/Mag,Yt-.073*Yrange/Mag
• RECTANGLE .41*Xrange/Mag,.085*Yrange/Mag,FILL,EDGE
• CONTROL 1;13,1
• IF N=2 THEN PRINT "Mandelbrot Plot"
• IF N>2 THEN PRINT " Z < Z^"&VAL\$(N)&"+C Plot"
• FRAME
• PEN 8
• MOVE Xc-Xrange/Mag/10,Yc
• DRAW Xc+Xrange/Mag/10,Yc
• MOVE Xc,Yc-Yrange/Mag/10
• DRAW Xc,Yc+Yrange/Mag/10
• PEN 2
• MOVE -Xrange/Mag/40,0
• DRAW Xrange/Mag/40,0
• MOVE 0,-Yrange/Mag/40
• DRAW 0,+Yrange/Mag/40
• CONTROL 1;2,16
• PRINT "Xc:";DROUND(Xc,13)
• CONTROL 1;22,16
• PRINT "Yc:";DROUND(Yc,13)
• MOVE Xl,Yb
• DRAW Xr,Yb
• RETURN
• Input:!
• IF Do_movie=0 THEN
• OUTPUT 2;Xc,Yc,Mag;
• INPUT "Xc: Yc: Mag:",Xc,Yc,Mag
• END IF
• Xcl=Xc
• Ycl=Yc
• IF Mag=1 THEN
• Xinc=3.5/Xpic
• Yinc=2.5/Ypic
• Xl=-2.50
• Xr=1
• IF N>2 THEN
• K=1
• Xl=-1.75
• Xr=+1.75
• END IF
• Yb=-1.25
• Yt=1.25
• ELSE
• Xinc=3.5/Xpic/Mag
• Yinc=2.5/Ypic/Mag
• Xl=Xc-Xrange/2/Mag
• Xr=Xc+Xrange/2/Mag
• Yb=Yc-Yrange/2/Mag
• Yt=Yc+Yrange/2/Mag
• END IF
• RETURN
• Ginit:!
• CLEAR SCREEN
• PEN 2
• VIEWPORT 0,53.7,59.6,100
• FRAME
• VIEWPORT 0,53.7,62.3,100
• FRAME
• J3880:!VIEWPORT 0,100*RATIO*.8,24,100
• FRAME
• WINDOW Xl,Xr,Yb,Yt
• FRAME
• PEN 1
• RETURN
• Save_file:!
• Sf=-Sf
• IF Sf>0 THEN
• Sf\$="SaveFile ON "
• ELSE
• Sf\$="SaveFile OFF "
• END IF
• RETURN
• Do_movie:!
• Do_movie=1
• Rtime_bgn=TIMEDATE
• Mag=1
• OUTPUT 2;"MB_";
• INPUT "Input Base of Gname\$ of File(s) To store to Folder 'NEW' (Index# & .gif Added Automatically)",Gif_temp\$
• J4014: OUTPUT 2;"Pics";
• INPUT "Input Number Of Pics To Store (MAX 24)",Pics
• IF Pics<1 OR Pics>24 THEN GOTO J4014
• FOR Im=1 TO Pics
• GOSUB Input
• GOSUB Raster
• GOSUB Gstore
• IF Sho>0 THEN !Show Pics Between Pics
• FOR Pn=1 to Im
• Beep 400*2^(Pn/8),.2
• WAIT .5
• NEXT Pn
• IF Sf>0 THEN
• Gname\$=Gif_temp\$&VAL\$(Im)&".gif"
• GOSUB Make_gif
• END IF
• Mag=2.E+11
• ! Mag=Mag*10
• ! Tries=LOG(Mag)/LOG(10)*500
• NEXT Im
• Do_movie=0
• RETURN
• Gstore:!
• IF Im=1 THEN GSTORE P1(*)
• IF Im=2 THEN GSTORE P2(*)
• IF Im=3 THEN GSTORE P3(*)
• IF Im=4 THEN GSTORE P4(*)
• IF Im=5 THEN GSTORE P5(*)
• IF Im=6 THEN GSTORE P6(*)
• IF Im=7 THEN GSTORE P7(*)
• IF Im=8 THEN GSTORE P8(*)
• IF Im=9 THEN GSTORE P9(*)
• IF Im=10 THEN GSTORE P10(*)
• IF Im=11 THEN GSTORE P11(*)
• IF Im=12 THEN GSTORE P12(*)
• IF Im=13 THEN GSTORE P13(*)
• IF Im=14 THEN GSTORE P14(*)
• IF Im=15 THEN GSTORE P15(*)
• IF Im=16 THEN GSTORE P16(*)
• IF Im=17 THEN GSTORE P17(*)
• IF Im=18 THEN GSTORE P18(*)
• IF Im=19 THEN GSTORE P19(*)
• IF Im=20 THEN GSTORE P20(*)
• IF Im=21 THEN GSTORE P21(*)
• IF Im=22 THEN GSTORE P22(*)
• IF Im=23 THEN GSTORE P23(*)
• IF Im=24 THEN GSTORE P24(*)
• RETURN
• IF Pn=1 THEN GLOAD P1(*)
• IF Pn=2 THEN GLOAD P2(*)
• IF Pn=3 THEN GLOAD P3(*)
• IF Pn=4 THEN GLOAD P4(*)
• IF Pn=5 THEN GLOAD P5(*)
• IF Pn=6 THEN GLOAD P6(*)
• IF Pn=7 THEN GLOAD P7(*)
• IF Pn=8 THEN GLOAD P8(*)
• IF Pn=9 THEN GLOAD P9(*)
• IF Pn=10 THEN GLOAD P10(*)
• IF Pn=11 THEN GLOAD P11(*)
• IF Pn=12 THEN GLOAD P12(*)
• IF Pn=13 THEN GLOAD P13(*)
• IF Pn=14 THEN GLOAD P14(*)
• IF Pn=15 THEN GLOAD P15(*)
• IF Pn=16 THEN GLOAD P16(*)
• IF Pn=17 THEN GLOAD P17(*)
• IF Pn=18 THEN GLOAD P18(*)
• IF Pn=19 THEN GLOAD P19(*)
• IF Pn=20 THEN GLOAD P20(*)
• IF Pn=21 THEN GLOAD P21(*)
• IF Pn=22 THEN GLOAD P22(*)
• IF Pn=23 THEN GLOAD P23(*)
• IF Pn=24 THEN GLOAD P24(*)
• RETURN
• Make_gif:! 7-Oct-2010 by dac
• IF Do_movie=0 THEN
• OUTPUT 2;Gname\$;
• INPUT "Input File Gname\$ to Disk (include MSI)",Gname\$
• END IF
• CREATE Add\$&Gname\$,200000 ! May need more bytes for busy pict
• CONFIGURE DUMP TO "GIF"
• DUMP GRAPHICS
• CONFIGURE DUMP TO "WIN-DUMP"
• DUMP DEVICE IS 10
• RETURN
• Gif_setup:!
• Gfn=Gfn+1
• !Gname\$="A:ELIP"&VAL\$(Gfn)&".GIF"
• Gname\$="ELIPS"&VAL\$(Gfn)&".GIF"
• CONTROL 1;1,29
• PRINT Gname\$
• !OUTPUT 2;"CONT";
• !PAUSE
• IF Sf>0 THEN GOSUB Make_gif
• RETURN
• Clear_pics:!
• DISP "Clearing Pict Arrays"
• CLEAR SCREEN
• FOR Im=1 TO 24
• GOSUB Gstore
• NEXT Im
• DISP ""
• RETURN
• Init:!
• GINIT
• PLOTTER IS CRT,"INTERNAL";COLOR MAP
• COM INTEGER P0(1:640,1:240)
• COM INTEGER P1(1:640,1:240),P2(1:640,1:240),P3(1:640,1:240),P4(1:320,1:240)
• COM INTEGER P5(1:640,1:240),P6(1:640,1:240),P7(1:640,1:240),P8(1:640,1:240)
• COM INTEGER P9(1:640,1:240),P10(1:640,1:240),P11(1:640,1:240),P12(1:640,1:240)
• COM INTEGER P13(1:640,1:240),P14(1:640,1:240),P15(1:640,1:240),P16(1:640,1:240)
• COM INTEGER P17(1:640,1:240),P18(1:640,1:240),P19(1:640,1:240),P20(1:640,1:240)
• COM INTEGER P21(1:640,1:240),P22(1:640,1:240),P23(1:640,1:240),P24(1:640,1:240)
• COM INTEGER Protect,Cnt
• COM REAL X,Y,Xc,Yc,M,Xl,Xr,Yb,Yt,Yrange,Xrange,Rlimit,Mag
• COM Sf,Sf\$[20],Xpic,Ypic,Pics,Psel,Sel_pic0\$[18],Select_pic1\$[18]
• COM Apic,Area,Err_cnt, Gif_temp[40]
• DIM Pas(1:32,1:32)
• K=5! K:1-50 Modulated rate of PEN color change
• N=2! 2=Mandelbrot Bug 4=Triple Bug N=2 to N=11
• Xpic=380
• Ypic=241
• Tries=400
• DIM Orbit\$[16]
• Rlimit=16
• Xl=-2.25
• Xr=1.25
• IF N>2 THEN
• Xl=-1.75
• Xr=1.75
• END IF
• Xrange=Xr-Xl
• Yb=-1.25
• Yt=1.25
• Yrange=Yt-Yb
• IF Protect=0 THEN
• ! Some Points Of Interest
• Xc=-.995944618422
• Yc=.2952010011468
• Xc=-.814497250001
• Yc=.109516354166
• Xc=-.766191386166
• Yc=.100748859927
• Xc=-.764791386166
• Yc=.100696992707
• Mag=1
• GOSUB Clear_pics
• Protect=1
• END IF
• Sho=1
• GOSUB Do_movie_sho
• GOSUB Ginit
• Orb=1 ! 1=Enable
• GOSUB Orbit! Enable/Disable Orbit Show
• Psel=-1
• GOSUB Gstore_show
• Sf=1
• GOSUB Save_file
• Kbt=1
• GOSUB Kbd_toggle
• Pat=1
• GOSUB Prt_area_toggle
• RETURN
• END