Managed to squish this down to just 12 lines.
#Include Once "tinyptc.bi"
If( ptc_open( "DBF SCREEN", 800, 600 ) = 1 ) Then dim shared strx(15000) as integer , stry(15000) as integer , strz(15000) as double
0 redim shared buffer(800*600) as integer
FOR A=1 TO 15000
if set<15000 then STRX(A)=-8000+RND*(16000)
if set<15000 then STRY(A)=-8000+RND*(16000)
if set<15000 then STRZ(A)=RND*(32)
if set>=15000 then IF (STRX(A)/STRZ(A))+400>0 AND (STRX(A)/STRZ(A))+400<800 AND (STRY(A)/STRZ(A))+300>0 AND (STRY(A)/STRZ(A))+300<600 THEN BUFFER((int((STRY(A)/STRZ(A))+300)*800)+(int(STRX(A)/STRZ(A))+400)) = rgb (int(-STRZ(A)+30) shl 2,int(-STRZ(A)+30) shl 3,int(-STRZ(A)+30) shl 2)
if set>=15000 then IF STRZ(A)<0 THEN STRZ(A)=STRZ(A)+30 else STRZ(A)=STRZ(A)-.05 end if
if set<15000 then set=set+1 NEXT
ptc_update@buffer(0)
if inkey$="" then 0
It can be gotten down to 10 lines by combining the generation lines but it gets really messy then and it's bad enough as it is!!