I think I may have done it . . .
#include once "tinyptc_ext.bi"
const xres = 640 : const yres = 480:Dim shared as integer sf,a,x1,y1:sf=255
Dim shared as double x(sf),y(sf),z(sf),col:Declare Sub Stars:Dim Shared as Integer sb(xres*yres)
for a=0 to sf-1:x(a)=((rnd(1)*10000)-5000):y(a)=((rnd(1)*10000)-5000):z(a)=((rnd(1)*30)):next
ptc_allowclose(0):ptc_setdialog(1,"Fullscreen?",0,1)
If( ptc_open( "3D Starfield Test", XRES, YRES ) = 0 ) Then End -1:End If
WHILE(GETASYNCKEYSTATE(VK_ESCAPE)<> -32767 and PTC_GETLEFTBUTTON=FALSE)
Stars:ptc_update @sb(0):erase sb:Wend:ptc_close():end
Sub Stars:for a=0 to sf-1: z(a)=z(a)-0.1 :x1=320+(x(a)/z(a)):y1=240+(y(a)/z(a)):col=((-z(a))+30)*7
if int(col)>255 then col=255:col=int(col)
if x1>0 and x1<640 and y1>0 and y1<yres then sb(x1+(y1*xres))=rgb(col,col,col) else z(a)=30 end if
next a:End Sub