'Wipples'- a serendipitous mis-programmed use of XOR plotting,
nomainwin
WindowWidth =800
WindowHeight =800
button #w.b, "Save", [saveScreen], LR, 50, 640
open "Growing circles" for graphics_nsb as #w
#w "trapclose [quit]"
#w "size 2 ; down ; fill 50 50 50 ; flush"
#w "when leftButtonUp [newCentre]"
#w "rule R2_COPYPEN"
numDrops =0
N =40
dim startX( N), startY( N), radius( N), color$( N)
startX( 0) =400: startY( 0) =400: radius( 0) =2: color$( 0) ="200 200 40"
timer 500, [growThem]
wait
[quit]
close #w
end
[growThem]
scan
for i =0 to numDrops
#w "up; goto "; startX( i); " "; startY( i); " ; down ; color "; color$( i); " ; circle "; radius( i)
if radius( i) <400 then radius( i) =radius( i) +2
next i
wait
[newCentre]
if numDrops <N then ' create a new one
numDrops =( numDrops +1)
startX( numDrops) =MouseX: startY( numDrops) =MouseY: radius( numDrops) =2: color$( numDrops) =randCol$()
else ' kill one and replace by new one
r =int( N *rnd( 1))
startX( r) =MouseX: startY( r) =MouseY: radius( r) =2: color$( r) =randCol$()
end if
wait
function randCol$()
randCol$ =str$( int( 256 *rnd( 1))) +" " +str$( int( 256 *rnd( 1))) +" " +str$( int( 256 *rnd( 1)))
end function
[saveScreen]
#w "getbmp scr 1 1 800 800"
bmpsave "scr", "wipple-" +str$( time$( "seconds")) +".bmp"
wait