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
/
WASH1.GFA
(
.txt
)
< prev
Wrap
GFA-BASIC Atari
|
1996-09-06
|
2KB
|
62 lines
'
'
'
' Washing machine projection
'
max_ring_table%=60 !Pic only has a radius of 50...
max_ring_size%=256
'
'
RESERVE 600000
' VOID XBIOS(5,L:-1,L:-1,0)
wash%=MALLOC(100*100*2)
mem%=wash%
ystart#=-50
xstart#=-50
yy%=20
xx%=40
mult#=max_ring_table%/SQR((50*50)+(50*50))
maxl%=0
maxp%=0
'
FOR y#=ystart# TO 49 !200 pixels high
FOR x#=xstart# TO 49 !200 pixels wide
IF x#<>0
x1#=x#
ELSE
x1#=1E-05
ENDIF
'
p%=((ATN(-y#/x1#)/2/PI))*max_ring_size%
' --------- Fix for quadrant --------- '
IF x#<0
IF y#<0 !Quadrant 2 - negative
p%=(max_ring_size%/2)+p%
ELSE
p%=p%+(max_ring_size%/2) !Quadrant 3
ENDIF
ELSE
IF y#>0 !Quadrant 4 - negative
p%=(max_ring_size%)+p% !(p negative here)
ENDIF
ENDIF
' ----------------------------------- '
'
l%=(SQR(x#*x#+y#*y#)*mult#)
PSET x#+100,y#+100,l%
'
maxl%=MAX(l%,maxl%)
maxp%=MAX(p%,maxp%)
POKE mem%,l% !Ring no
POKE mem%+1,p% !angle
ADD mem%,2
NEXT x#
NEXT y#
'
BSAVE "d:\source2\m21.st\data\wash.dat",wash%,mem%-wash%
PRINT maxl%,maxp%
REPEAT
k$=INKEY$
UNTIL k$<>""
' CLS