Z<-M_GETPOINT CNT;B;P;Q;R |Find a point on border of Mandelbrot set |Use successive bisection from two unequal points. CNT<-52 #ifndef "CNT" P<-_2+4*XRAND 40 R<-0=300 MSET Z<-2tP;P<-2dP WHILE 00 Z<-Q,Z IF ~R; Z<- 2 m Z WHILE 00)/Z "MANDEL.OPTS" -at AT<-SHIFT -box BOX<-SHIFT -cnt CNT<-#fi SHIFT -lut LUT<-SHIFT -size SIZE<-SHIFT -o OFILE<-SHIFT -v QV<-1 Z<-MANDEL STR;AT;CNT;DZ;BOX;LUT;N;OFILE;QV;SIZE;T;U;XI;ZP | z<-z^2+c iteration | BOX x0,y0,x1,y1 | AT affine transform. AT<-"0,0,1,0.0"; TWOPI<-8*_3o1 CNT<-34;SIZE<-"200x300"; BOX<-"-2,-1.2,0.6,1.2" QV<-0; OFILE<-"mz.xpm" LUT<-".123456789ABCDEF" STR<-MANDEL.OPTS GETOPTS Z<-STR AT<-"," PARSE_NUM AT BOX<- "(),+" PARSE_NUM BOX N<-*/SIZE<-PARSE_NUM SIZE DZ<-(BOX[2 3]-BOX[0 1])%1.0* m SIZE C<-BOX[0 1]+:(N/:DZ)* mi SIZE |X,Y pairs C<-C*:AT[2]*2 1 o TWOPI*AT[3] C<-C+:AT[0 1] XI<-CNT MSET C XI<-SIZE r LUT[XI #mod rLUT] |Color code this 0 r MK_XPM"-var XI -o ", Z<-OFILE IF QV; 0 r #cmd"display ",OFILE, " &" "MSPIN.OPTS" -alpha AL<- #fi SHIFT -cnt CNT<-#fi SHIFT -lut LUT<-SHIFT -size SIZE<-SHIFT -gif GIF<-SHIFT -phi PHI<-#fi SHIFT -st ST<-SHIFT Z<-P MANDEL_SPIN STR;AL;CNT;SIMAP;DXY;DZ;GIF;LUT;OFILE;PHI;THETA;SIZE;ST;XI |Zoom into a point with rotation TWOPI<-8*_3o1 CNT<-20; OFILE<-"ms-0000.xpm"; SIZE<-"200x300"; GIF<-""; ST<-"" AL<-0.5 DZ<-20 20 | was DZ<-2 2 THETA<-PHI<-0.0 LUT<-".123456789ABCDEF" IF 8 = #nc"P"; ->AA WHILE 0=rP<-M_GETPOINT;WEND AA: Z<-P SIMAP<-MK_RMAP "64" STR<-MSPIN.OPTS GETOPTS STR Z<-CNT START_NARRATIVE ST N<-*/SIZE<-PARSE_NUM SIZE DXY<-m ((i SIZE)-:SIZE%2)%1.0*(N,2)r SIZE%2 | [-1,1)*[-1,1) DXY<-DXY * N/:DZ WHILE 00 SIZE<-PARSE_NUM SIZE PIX<-SIZEr"." PIX<-Z PSET_POINTS"-src PIX -lut .3 -box -3,-2,2,3" Z<-MK_XPM"-var PIX -o ",OFILE Z<-MK_RMAP STR;L64;L80;LUT;NC;X |Random colormap L64<-".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0" L80<-L64,"%&():*+-/=[]{|}~" NC<-PARSE_NUM STR<-"32" #ifndef"STR" LUT<-(NCf80) t L80 Z<-(NC,6) r "0123456789ABCDEF"[16 16 n X<-?(NC*3)r256] X<-y(NC,3)rX Z<-Z[#sort X[?3]] |Sort by one color value Z[LUT i "."]<-"000000"; Z[LUT i "F"]<-"FFFFFF" Z<-(yLUT),(NC/:" c #"),Z Z<-"""",(Z,""""),"," "NBD.OPTS" -eps EPS<-#fi SHIFT -size SIZE<-SHIFT -o OFILE<-SHIFT Z<-P M_NBD STR;DXY;DZ;EPS;LUT;N;OFILE;SIMAP;SIZE;XI |Make image of a neighbourhood of a point P OFILE<-"t.xpm"; SIZE<-"200x300"; EPS<-1E-12; DZ<-2 2 LUT<-32 t ".123456789", ALPHA SIMAP<-MK_RMAP "32" STR<-NBD.OPTS GETOPTS STR N<-*/SIZE<-PARSE_NUM SIZE DXY<-m ((i SIZE)-:SIZE%2)%1.0*(N,2)r SIZE%2 | [-1,1)*[-1,1) DXY<-DXY * N/:DZ Z<-P+: EPS * DXY XI<-750 MSET Z XI<-SIZE r LUT[XI #mod rLUT] |Color code this Z<- MK_XPM"-cmap SIMAP -var XI -o ", OFILE Z<-Z_POINT STR;AL;CNT;DXY;DZ;I;LUT;M;P;SIMAP;R;SIZE;T;V;XI |Check quality of border point I<-0; CNT<-10; SIZE<-"200x300"; AL<-0.01; DZ<-2 2 WHILE 0=rZ<-P<-M_GETPOINT; WEND N<-*/SIZE<-PARSE_NUM SIZE DXY<-m ((i SIZE)-:SIZE%2)%1.0*(N,2)r SIZE%2 | [-1,1)*[-1,1) DXY<-DXY * N/:DZ T<-0 0, P WHILE I7; Z<-Z,(2dH[0]),H[N-2] WEND N<-(rZ)%6; Z<-(N,6)rZ Z<-(Z[:2]=7)/:Z IF 0=rOFILE; ->0 I<-0;N<-1tr:H<-Z;Z<-"" WHILE I
animation $SRC.gif
$PX
$PY
$SRC.jpg
Z<-INDEX_POINTS STR;TAB;I;NC;NR;PX;PY;SRC |Make html fragment NC<-5 |Columns of outer table TAB<-STR<-"" #ifndef "STR" IF 0=r,STR; TAB<-#sed"X:r hit.dat;:cm" Z<-"\\"; I<-0; NR<-1tr:TAB WHILE I0)f 0=I #mod NC; Z<-Z,"\\" STR<-TAB[I++] STR SRC<-_4 d SHIFT; PX<-SHIFT; PY<-SHIFT Z<-Z,,"\",SUBS_VARS SEL.ITEM WEND Z<-#sstomat Z,"\\
\" # # subtitles # require a method of subtitle of a frame. # It should implement a (scrolling) banner in each frame. # /usr/share/mplayer/.... contains several font files # ImageMagick. requires mpeg2encode. # "mset.txt" >> EOF The MANDELBROT SET has been described as the most complex structure in mathematics. It is a subset of the complex plane. A point c is in the Mandelbrot set if the sequence z[n] defined as z[n+1] = z[n]^2+c with z[0]=c is bounded. EOF "art.txt" >> EOF THIS IS NOT ART. THIS IS SCIENCE. EXPERIMENTAL MATHEMATICS IS A VALID METHOD OF STUDY. LEARN TO PROGRAM YOUR COMPUTER. MODEL CLIMATE CHANGE, GLOBAL ECONOMY AND THE FINANCIAL SYSTEM ON YOUR KITCHEN TABLE. EOF "sci.txt" >> EOF SCIENTIFIC ANIMATIONS. FRACTAL GENERATORS ILLUSTRATE DYNAMICAL SYSTEMS. A DYNAMICAL SYSTEM IS A SET X, WITH A TOPOLOGY ALONG WITH A FUNCTION F:X->X. POINCARE STUDIED THE ITERATES OF SUCH A FUNCTION TO STUDY THE STABILITY OF THE SOLAR SYSTEM. EOF "cat.txt" >> EOF DYNAMICAL SYSTEMS. ARNOLD'S CATMAP ITERATES A SHEAR TRANSFORM OF AN IMAGE. WHEN YOU ITERATE A PERMUTATION OF A FINITE SET YOU OFTEN QUICKLY RETURN TO THE ORIGINAL CONFIGURATION. EOF "frac.txt">>EOF FRACTALS ARE STRUCTURES WHERE COMMON FEATURES REAPPEAR UNDER ROTATION OR SCALE CHANGE. 19 TH CENTURY EXAMPLES INCLUDE THE CANTOR SET, THE SIERPINSKY GASKET, AND THE WEIERSTRASS NON DIFFERENTIABLE FUNCTION. EOF Z<-CNT START_NARRATIVE STR;N |Set global variables Z<-0; CNT<-300 #ifndef "CNT" IF 0=rSTR; ->0 Z<-#deb ," ", Z<-$NL[STR] N<-rTBAR.BITS<-TXT2XPM "-fnt ../font/sc.fnt ", Z TBAR.DX <-1+(0 c N[1]-300)%CNT Z<-N, TBAR.DX Z<-IMG SUB_TITLE STR;I;M;N |Set a subtitle |Global TBAR.BITS, TBAR.DX M<-rTBAR.BITS N<-rZ<-IMG I<-(N[0]-M[0])+iM[0] Z[I]<-(M[0], N[1])t TBAR.BITS TBAR.BITS<-TBAR.DX m TBAR.BITS |Scroll TBAR.BITS Z<-IMG TITLE_BAR STR;J;N;SIZE |Add BW title frame at bottom of an image J<-iN<-rZ<-TXT2XPM STR IF 1 #ne #nc "IMG"; ->0 SIZE<-rIMG J<-SIZE b J+:(SIZE[0]-N[0]),0 IMG*[J]<-,Z Z<-IMG Z<-MVIDEO STR;LUT;P;IK;GOFILE |Mandelbrot spin with banner |LUT<-".111111122223334456789ABCDEGHIJKLMNOPQRSTUVabcdefghijkF" IK<-STR YDX 0 P<-#fi STR YDX 1 2 OFILE<-(_4dIK), ".gif" LUT<-".111112223456789ABCDEGHIJKLMNOPQRSTUVWXYZF" |STR<-"-cnt 600 -size 200x300 -alpha 0.95 -phi 0.03 -gif ",OFILE STR<-"-st mset.txt -cnt 328 -alpha 0.9 -phi -0.0014 " STR<-STR," -lut ", LUT Z<-P MANDEL_SPIN STR Z<-BM XPM_OVERLAY STR;AL;IDX;JDX;KDX;JR;K;N;NP;OFILE;YX |change .xpm image data AL<-100 YX<-"0,0" Z<-OFILE<-"t.xpm" IF 0=r, BM<-"" #ifndef "BM"; ->0 STR<-"-yx YX<-SHIFT|-alpha AL<-#fi SHIFT|-o OFILE<-SHIFT" GETOPTS STR SRC<-STR IF 0 = r OFILE; OFILE<-SRC YX<-PARSE_NUM YX 0 #sed":r ",SRC IDX<-0 #nxfind""".*""" Z<-PARSE_NUM $T[IDX[0]] JR<-IDX[1+Z[2]+iZ[1]] Z<-Z[1 0] t 0 1 d $T[JR] NP<-(AL*r,BM)%100 |Replace AL% of pixels JDX<-NP? r,BM KDX<-(rZ) b YX +: (rBM)nJDX Z*[KDX]<-(,BM)[JDX] Z<-"""",Z,"""" $T[JR]<-Z $T[_1tJR]<-_1d $T[_1tJR] 0 r 0 #sed":u ", Z<-OFILE