Came up with this little snippet, not fully knowing what the outcome was going to look like. Looks like a cheap water caustic imitation, not the fastest thing though.
SetWindowSize( 720, 405, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 720, 405 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
`SetSyncRate( 30, 1 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
// set print properties
SetPrintSize( 26 )
SetPrintColor( 255, 255, 0 )
Type Point2D
x as float
y as float
dx as float
dy as float
c as integer
EndType
points as Point2D[180]
for i = 0 to points.length-1
points[i].x = random(10, 710)
points[i].y = random(10, 395)
a# = random(0, 360)
points[i].dx = cos(a#)
points[i].dy = sin(a#)
points[i].c = random(0,1)
next i
colors as integer[1]
colors[0] = makeColor(0, 120, 250)
colors[1] = makeColor(100, 200, 255)
c = makeColor(0,0,255)
speed = 2
do
drawBox(0, 0, 720, 405, c,c,c,c,1)
for i = 0 to points.length-1
points[i].x = points[i].x + points[i].dx*speed
points[i].y = points[i].y + points[i].dy*speed
if points[i].x < 0 or points[i].x > 720 then points[i].dx = points[i].dx*-1
if points[i].y < 0 or points[i].y > 405 then points[i].dy = points[i].dy*-1
j = getClosestPoint(i, points)
drawLine(points[i].x, points[i].y, points[j].x, points[j].y, colors[points[i].c], colors[points[j].c])
next i
print(screenfps())
sync()
loop
function getClosestPoint(j, points as Point2D[])
d# = 1000000000
c = j
for i = 0 to points.length-1
if i <> j
n# = (points[j].x - points[i].x)^2 + (points[j].y - points[i].y)^2
if n# < d#
d# = n#
c = i
endif
endif
next i
endfunction c