An example:
' sier on plasma.bas SmallBASIC 0.12.2 [B+=MGA] 2016-04-17
'posted version with ball and cube along with plasma
while 1
cls
sier 0,0,xmax,ymax
sier 0,ymax/2-.1*ymax,.2*xmax,.2*ymax
sier xmax-.2*xmax,ymax/2-.1*ymax,.2*xmax,.2*ymax
delay 2000
wend
pause
sub sier(tlx,tly,width,height)
local ax,ay,bx,by,cx,cy,px,py,top,n,a,a1,r1,r2,g1,g2,b1,b2,c1,c2
ax = tlx
ay = tly+height
bx = tlx+width
by = tly+height
cx = tlx+width/2
cy = tly
px = tlx
py = tly+height
top=width*height*.25
a=127:a1=63
r1=rnd^2:g1=rnd^2:b1=rnd^2
r2=rnd^2:g2=rnd^2:b2=rnd^2
for n=0 to top
c1=RGB(a+a*sin(r1*px),a+a*sin(g1*px),a+a*sin(b1*px))
c2=RGB(a1+a1*sin(r2*px),a1+a1*sin(g2*px),a1+a1*sin(b2*px))
pset px,py,c1
pset px,ymax/2-(py-ymax/2),c2 '<=== BOGO, buy one get one half off
select Case int(rnd*3)
case 0
px = (px + ax) / 2.0
py = (py + ay) / 2.0
case 1
px = (px + bx) / 2.0
py = (py + by) / 2.0
case 2
px = (px + cx) / 2.0
py = (py + cy) / 2.0
end select
next
showpage
end