>=<fU`ffPUPUUfffUUUUU`ffffPUUUPUUUU`ffffUUUUfPUUUU`ffffUUUU`f`ffPUUUUfffUUUUfffffUUU`ffPUUU`fff`ffffPUUfUUffff`ffffUPUffff`fffffffffff"`fffU`ff """ffPUPUUf "" "" "`fUUUUU "" "" """"PUUUPUUUU"""" """"UUUUPUUUU """""""UUUUPUUUU"""""" " ""UUUUUUU " """""" """""PUUUPUU"" """""" "" """"UUU"" """""" """"""""PU`f"" """"""" """""""fff " """"""""""""""`ff`fff"""""" """""""""fffffff "" " """" """""""""`ffffffff" """"""" """" """"`ffffffff "" """" """""""""`ffff`fff """"" " "" "" ""fffff "" """"" ""`ff`f" """"" ""f """" """U "" " ""PUPUU" "" ""UUUUU """" ""PUUUPUUUU"" """"" ""UUUUPUUUU"" """ "" """" ""UUUUPUUUU"""""""""" "" ""UUUUUUU" """""""" "" ""PUUUPUU """" """" """UUU "" " "" "" "PU "" """"""""" " """ """ """"" """"""""""f"" """"""""" """ """"""""`f`ff " "" """""" """ """ """"""""fffff"""""""" """ """ "" """ "`fff`ffff """""""" """"""""ffff`ffff " """""""""""" " " ""ffff`ffff"""" """""""""" """ ""fffffff """ """ """""""""""""""""`fff`ff"""" """""""""""""""" "" "" """"fff"""" """""""""""""" " "" "" """"`f""""""""""""""""" "" "" """" """ """""""""""" """"""""""""""""""""" """" "" """"""""""""""" """""""PUPU""""""""""""""""""""" "UUUU """""""""" """""""""""PUUUPUUU " """"""""""" """""""""""UUUUUUUU""""""""""" """""""""" ""UUUUUUUU"" """"""""""""""""" " ""UUUUUUUU""""""""""""""""""" ""PUUUPUUU " "" """"""""""""""""UUUU """"""""""""""""""PUPU "" """" """"""""""" """""" """ """"""""" "" "" """ "" "" """""""" "" " """"""""""" """"""""" """""f""""" "" " " """"""""" """"`f`ff""""""""""" """"""""""fffff "" """""" " " """" " ""`fff`ffff""""""""""" """"""ffff`ffff " "" "" """"" "" """"ffff`ffff""" """""" " "" " """"fffffff"" "" " """ """" """"`fff`ff"""""""""""""fff " "" """""" ""`f """" "" " """"" """" "" " """" """"""" ""U""" """" """ ""PUPUU "" """"""""""UUUUU "" """" " ""PUUUPUUUU """"""" "" ""UUUUPUUUU" " """ """" ""UUUUPUUUU""""" """ ""UUUUUUU """"" """ ""PUUUPUU""""" "" """"UUU"""" "" " """"PU"""" """" "" " "`f """ " """" """"fff"""""""" """`ff`fff " """ """"" "fffffff""""""""""`ffffffff """"" """""""`ffffffff"""""""" """""`ffff`fff"" """"""" "fffff"""""" " ""`ff`f " " " """ ""fU"" " """ ""PUPUU" " """"" """ ""UUUUU """" """"" """""PUUUPUUUU """" """"""" ""UUUUPUUUU """""" " " ""UUUUPUUUU" " " ""UUUUUUU"PUUUPUUf`fUUU`ffffPUfff`fff`ffffffff`ffffUPUffff`ffffPUUUUfffffffUUU`fPUUU`fff`ffPUUUUffUUUUfffPUUUU`fffUUUU`fPUUUUffffUUUUUUUffffPUUUPUUffffUUU`fffPUff`f°-- title: watermelon -- author: potato imaginator -- desc: Press 'Z' to Reset -- script: lua function BOOT() cos=math.cos sin=math.sin pi=math.pi rnd=math.random r=52 -- Radius of Watermelon r2=4 -- Radius of Outer shell cirlces n=14 -- Outer Shell no of circles ns=8 -- No of Black Seeds a={} -- circle array min=2 -- Minimum distance max=r/4 -- Maximum radius of red val=2 -- Starting radius value for i=0,ns-1 do a[i+1]= {x=120+5*r/8*cos(2*pi*i/8), y=68+5*r/8*sin(2*pi*i/8), r=4,col=0} end zr=val -- Starting radius variable st=2 -- State 1 or 2 end function dis(x1,y1,x2,y2) return ((x1-x2)^2+(y1-y2)^2)^0.5 end function check(x,y,rad,size) local zd=-1 zd=dis(x,y,120,68) if zd+rad+min>=r then st=1 zr=val return false end for i=1,size do if dis(x,y,a[i].x,a[i].y)<= rad+a[i].r+min then st=1 zr=val return false end end if rad>max then st=1 zr=val return false end return true end function upd() local ang=2*pi*rnd(0,99)/100 local d=rnd(0,r-zr) if #a==ns then a[#a+1]= {x=120+d*cos(ang),y=68+d*sin(ang), r=zr,col=2} st=2 elseif st==1 and #a>0 then local ang=2*pi*rnd(0,99)/100 local d=rnd(0,r-zr) local zx=120+d*cos(ang) local zy=68+d*sin(ang) if pix(zx,zy)~=2 then if check(zx,zy,zr,#a) then a[#a+1]={x=zx,y=zy,r=zr,col=2} st=2 end end elseif st==2 and #a>0 then if check (a[#a].x,a[#a].y,a[#a].r+min, #a-1) then a[#a].r=a[#a].r+1 end end end function TIC() cls() for i=1,30 do upd() end for i=1,#a do circ(a[i].x,a[i].y,a[i].r,a[i].col) end for i=1,2*n do circ (120+(r+r2)*cos(pi*i/n), 68+(r+r2)*sin(pi*i/n),r2,5+i%2) end if btnp(4) then reset() end end