home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Falcon 030 Power 2
/
F030_POWER2.iso
/
ST_STE
/
MAGS
/
MAGGIE22.ARJ
/
magg22st.msa
/
GOODIES
/
ST_INTRO.ZIP
/
M21.ST
/
DATA
/
TUNNEL.GFA
(
.txt
)
< prev
next >
Wrap
GFA-BASIC Atari
|
1996-08-22
|
1KB
|
48 lines
' Tunnel projection
'
'
'
RESERVE 600000
' VOID XBIOS(5,L:-1,L:-1,0)
tunnel%=MALLOC(640*200*2)
mem%=tunnel%
zs%=500
ystart%=-60
xstart%=-120
'
FOR y#=ystart% TO ystart%+79 !160 pixels high
FOR x#=xstart% TO xstart%+159 !320 pixels wide
IF x#<>0
x1#=x#
ELSE
x1#=1E-05
ENDIF
p%=(ATN(y#/x1#)/2/PI)*32*8 !.....
'
l#=SQR(x#*x#+y#*y#)/4 !These two are the problems
IF l#<>0
dist%=(zs%/l#)+0.5
' IF l>10/6
PSET 180+x#,100+y#,dist%
PSET 180-x#,100-y#,p%
'
l%=((p% AND 63)*2)+(64*2*(dist% AND 31))
'
IF l%>64*2*33
END
ENDIF
DPOKE mem%,l%
ELSE
DPOKE mem%,0
ENDIF
ADD mem%,2
NEXT x#
NEXT y#
'
BSAVE "d:\source2\m21.st\data\tunnel.dat",tunnel%,mem%-tunnel%
REPEAT
k$=INKEY$
UNTIL k$<>""
CLS
PRINT mem%-tunnel%