DOT TUNNEL

Post Reply
DrChip
Posts: 167
Joined: Wed Oct 22, 2014 3:26 pm
My devices: iPhone 4 to 6+,iPad mini to iPad air 2

DOT TUNNEL

Post by DrChip »

REM DOT TUNNEL
REM iPhone 6 plus / 8.2 b3
REM I updated my other tunnel...
' it would look nice as a vortex vector
' tunnel. enjoy
pi=3.1415
tunfad=-370
dr=360*3
rings=10
movement=.5
DIM orgx(dr+1)
DIM orgy(dr+1)
DIM offx(rings+1)
DIM offy(rings+1)
DIM cirz(rings+1)
DIM rotate(rings+1)
sw=Screen_Width()
sh=Screen_Height()
graphics

FOR a=1 TO 1040
orgx(a)=25*SIN(a*PI/180)
orgy(a)=25*COS(a*PI/180)
NEXT a
zst=1

FOR a=1 TO rings
offx(a)=sw/2
offy(a)=sh/2
cirz(a)=zst
zst=zst+2
rotate(a)=a
NEXT a
t$=" "
t$=t$&"ANOTHER SILLY ROUTINE... "
t$=t$&"THE TUBE CONTAINS ABOUT 180 RECTANGLES AND "
t$=t$&"NEXT VERSION WILL BE IN FILLED 3D!!!!"
p=0
scx=10

loop:
Refresh off
graphics clear 0,0,0

GOSUB tunnel
fill COLOR .50,0,.155
fill RECT 0,0 to sw, 20
fill RECT 0,sh-20 to sw, sh

scx=scx-2
IF scx<0 THEN
p=p+1
END IF
IF scx<0 THEN
scx=scx+1
END IF
IF p>LEN(t$)-2 THEN
p=0
END IF

IF tunfad<0 THEN
tunfad=tunfad+1
END IF
lt=len(t$)-1
draw COLOR 1,1,1
DRAW TEXT "DOT TUNNEL" at 0,0
DRAW TEXT substr$(t$,p,lt) at scx,sh-20

refresh on
GOTO loop

tunnel:
FOR b=1 TO rings
fill COLOR (cirz(b)+tunfad)/255,(cirz(b)+tunfad)/255,(30*cirz(b)+tunfad)/255
'change the stepsize to 10 to see it as i intended you to
FOR a=1 TO 360 STEP 10
tfx=(orgx(a+rotate(b))*cirz(b))+offx(b)
tfy=(orgy(a+rotate(b))*cirz(b))+offy(b)
draw size 15
fill rect tfx,tfy to tfx+2+(cirz(b)),tfy+2+(cirz(b))

NEXT a
NEXT b
FOR a=1 TO rings
cirz(a)=cirz(a)+.1
IF cirz(a)>=20 THEN
GOSUB newpos
END IF
rotate(a)=rotate(a)+1 '3 step - larger makes it faster

NEXT a
RETURN

newpos:
tunsin=tunsin+movement
cirz(a)=cirz(a)-20
offx(a)=sw/2+20*SIN(tunsin/2)
offy(a)=sh/2+15*COS(tunsin)
rotate(a)=0
RETURN
Attachments
image.jpg
image.jpg (152.02 KiB) Viewed 2085 times

Post Reply