Into the Light (Shape Tunnel Variant) This is a variant of the shape tunnel demo from the PlayBASIC V1.64L (and probably way bellow) project pack, only difference is it's just filled this time. Sorta looks like looking up at light through water or mist.. Bit of a CPU hog to render though, but ya get that :)
[pbcode]
#include "blitimage"
screen=NewFxIMage(GetScreenWidth(),GetScreenHeight())
rings =180
RingSize#=800
FarDepth#=20000
NearDepth#=10
me=NewConvexShape(RingSize#,64)
Edges=GetShapeEdges(me,0)*rings
ClsColour=rgb(50,50,50)
Do
rendertoimage Screen
mx=getscreenwidth()/2
my=getscreenheight()/2
thisrgb=rgb(50,20,210)
thisrgb= $ffffff
zstep#=(NearDepth#-FarDepth#)/Rings
near=0
far=fardepth#
projection#=400
inkmode 1+64
ink $010302
lockbuffer
For lp=0 to rings
x#=cos(angle#+lp*2)*455
y#=sin(angle#+lp)*255
z#=FarDepth#+(lp*zstep#)
ProjectedSize#=(RingSize#*projection#)/z#
Scale#=ProjectedSize#/RingSize#
rotateshape me,Angle#+(lp*10),Scale#
sx#=mx+((x#*projection#)/z#)
sy#=my+((y#*projection#)/z#)
DrawShape me,sx#,sy#,2
next
unlockbuffer
angle#=wrapangle(Angle#,1)
rendertoscreen
blitimageclear Screen,0,0,ClsColour
Sync
loop
[/pbcode]