blobs.basB001_panl_a68k t ɾ&TEXTSmBa`@ap@apHSMain<ٵzٰٰ$zٰz' blobs.bas ' 05/01/2005 'by Mark R. Brown 'airship@mchsi.com 'http://www.atomicairship.com 'This program assumes default colors 'don't work correctly... :( pen on randomize w= [255,100,137,193,22,115] red=rgb(255,0,0) green=rgb(0,255,0) cyan=rgb(0,255,255) blue=rgb(0,0,255) yellow=rgb(255,255,0) white=rgb(255,255,255) black=0 colors=[black,red,green,blue, yellow,cyan] cls ?" ~~~~~~FRACTAL BLOBS~~~~~~" ?" For Hi-Res PolmOS 5" ? ?"This program grows blobs of" ?" 1-5 colors in zooms up to 20x" ?" in an INFINITE LOOP!" ?"The rules are:" ?"A random pixel is checked." ?"If black, place a blob of random" ?" size and color." ?"If a color, place a random sized blob" ?" of that color." ? ?"Tap the screen to continue.", pause 2 while pen(0)=false:wend cls ?" ~~~~~~FRACTAL BLOBS~~~~~~" ? ?"Large masses of the same color" ?"merge and become more stable" ?"over time. Small blobs are consumed." ?"Borders remain in conflict forever." ?"Edges are fractal; they reveal smaller" ?"blobs expanding the borders at" ?" higher zooms. Enjoy!" ? ?"Tap the screen to restart." ?"Hit the Memo button to quit." ? ?"Tap the screen to continue.", pause 2 while pen(0)=false:wend label start cls ?"Auto mode chooses # colors & zoom" ?" for you." label inauto input "auto mode (y/n): ",auto if auto<>"y" and auto<>"n" goto inauto endif if auto="y" tc=int(rnd*4)+2 zoom=int(rnd*10)*2+5 else label incolors input "# colors (1-5): ",tc if tc<1 or tc>5 goto incolors endif label inzoom input"zoom (0-20): ",zoom zoom=zoom+5 if zoom<5 or zoom>25 goto inzoom endif endif label justrun cls rect 0,0,319,319,0 filled while pen(0)=false x=int(rnd*318)+1 y=int(rnd*318)+1 what=point(x,y) if what=255 j=int(rnd*tc)+1 r=colors(j) else for j=1 to 5 if what=w(j) r=colors(j) endif next j endif d=int(rnd*zoom)+2 circle x,y,d,1,r filled wend pen off pause 2 pen on if auto="y" tc=int(rnd*4)+2 zoom=int(rnd*10)*2+5 goto justrun else goto start endif t endif 'wend