Two lines can be saved here, originally this was in 18 lines but I expanded it to 20 to get a speed gain.
This gives some really nice looking sine shade dots with a slight motion blur.
#Include Once "tinyptc.bi"
If( ptc_open( "20 LINE SINE DOTS BY SHOCKWAVE^DBF", 640, 480 ) = 0 ) Then End
dim shared buffer(640*481) as integer , buffer2(640*481) as integer, colours(500) as integer
for a=1 to 500
colours(a)=rgb(a shr 3,a shr 2,a shr 1)
next
do
gadd=gadd+1
for a=1 to 25000
X=(320+(319*sin((a+gadd)/150)))+((39*sin(GADD/180))*sin((a+gadd)/190))
Y=(240+(139*cos((a-gadd)/145))+((39*sin(GADD/99))*cos((a-gadd)/45)))
buffer2(X+(Y*640)) = buffer2(X+(Y*640))+100
if buffer2(X+(Y*640)) > 500 then buffer2(X+(Y*640)) = 500
next
for a=0 to 640*480
buffer(a)=colours(buffer2(a))
buffer2(a) = buffer2(a) * .70
next
ptc_update@buffer(0)
loop until inkey$<>""