Commit b7fe039f by kollo

cosmetic improvements...

cosmetic corrections

cosmetic improvements

little update in cp210x-DL-141.bas
parent 4315efc4
......@@ -19,55 +19,55 @@ CLR OMX,OMY,OS,OH1,OH2
IF MAP(PX+1,PY)=0
PLA=0 ! Orientierung rechts
ELSE
PLA=90.001 ! Orientierung unten
PLA=90.001 ! Orientierung unten
ENDIF
DO ! ENGINE
@render
@minimap
if fadenkreuz%
COLOR weiss
circle scrw%/2,scrh%/2,20
line scrw%/2-30,scrh%/2,scrw%/2+30,scrh%/2
line scrw%/2,scrh%/2-30,scrw%/2,scrh%/2+30
endif
keyagain:
IF fadenkreuz%
COLOR weiss
CIRCLE scrw%/2,scrh%/2,20
LINE scrw%/2-30,scrh%/2,scrw%/2+30,scrh%/2
LINE scrw%/2,scrh%/2-30,scrw%/2,scrh%/2+30
ENDIF
keyagain:
COLOR gelb,schwarz
TEXT 130,20,"w=forward, y=back, a=turn left, d=turn right"
SHOWPAGE
KEYEVENT a,b,k$
IF PX>=MW%-0.4 or Py>=MH%-0.4 ! WIN!
IF PX>=MW%-0.4 OR Py>=MH%-0.4 ! WIN!
ALERT 1,"CONGRATULATIONS!||Play again?",1,"YES|NO",a%
IF a%=1
RUN
IF a%=1
RUN
ENDIF
QUIT
ENDIF
' MOVEMENT
IF k$="q" or k$=chr$(27)
IF k$="q" OR k$=chr$(27)
ALERT 1,"Do you want to Quit?||",1,"YES|NO",a%
IF a%=1
QUIT
ENDIF
ELSE IF k$=" "
fadenkreuz%=not fadenkreuz%
ELSE IF k$="d"
fadenkreuz%=not fadenkreuz%
ELSE IF k$="d"
ADD PLA,RS
ELSE IF k$="a"
ELSE IF k$="a"
SUB PLA,RS
ELSE IF k$="w"
IF MAP(PX+DX*2*MS+0.5,PY)=0
ADD PX,DX*MS
ADD PX,DX*MS
ENDIF
IF MAP(PX,PY+DY*2*MS+0.5)=0
ADD PY,DY*MS
ENDIF
IF MAP(PX+DX*2*MS+0.5,PY)<>0 and MAP(PX,PY+DY*2*MS+0.5)<>0
IF MAP(PX+DX*2*MS+0.5,PY)<>0 AND MAP(PX,PY+DY*2*MS+0.5)<>0
COLOR weiss
TEXT scrw%/2-32,scrh%/2+4,"AUTSCH!!!"
GOTO keyagain
ENDIF
' Do not remove this line until compiler bug is fixed....
ELSE IF k$="y"
ELSE IF k$="y"
IF MAP(PX-DX*2*MS+0.5,PY)=0
SUB px,DX*MS
ENDIF
......@@ -95,29 +95,29 @@ PROCEDURE render
RDY=DY+DX*CX
MX=INT(RX)
MY=INT(RY)
if rdx=0
add rdx,0.001
endif
IF rdx=0
ADD rdx,0.001
ENDIF
DDX=SQR(1+(RDY*RDY)/(RDX*RDX))
if rdy=0
add rdy,0.001
endif
IF rdy=0
ADD rdy,0.001
ENDIF
DDY=SQR(1+(RDX*RDX)/(RDY*RDY))
IF RDX<0
IF RDX<0
STX=-1
SDX=(RX-MX)*DDX
SDX=(RX-MX)*DDX
ELSE
STX=1
SDX=(MX+1-RX)*DDX
ENDIF
IF RDY<0
IF RDY<0
STY=-1
SDY=(RY-MY)*DDY
SDY=(RY-MY)*DDY
ELSE
STY=1
SDY=(MY+1-RY)*DDY
ENDIF
120:
120:
IF SDX<SDY
ADD SDX,DDX
ADD MX,STX
......@@ -133,14 +133,14 @@ PROCEDURE render
OH1=scrh%/2
OH2=scrh%/2
ELSE
IF MAP(MX,MY)=0
IF MAP(MX,MY)=0
GOTO 120
ENDIF
' HIT A WALL-WHICH?
IF S=0
IF S=0
PWD=ABS((MX-RX+(1-STX)/2)/RDX)
ADD S,2*abs(RDX<0)
ELSE
ADD S,2*abs(RDX<0)
ELSE
PWD=ABS((MY-RY+(1-STY)/2)/RDY)
ADD S,2*abs(RDY<0)
ENDIF
......@@ -184,41 +184,41 @@ PROCEDURE mazegen
' DIM OF=-1,-mw%,1,mw%
POKE VARPTR(M$)+CC,ASC("0")
STK$=MKL$(CC)
340:
340:
NN=0
FOR N=1 TO 4
IF MID$(B$,CC+OF(N)+1)<>"1"
IF MID$(B$,CC+OF(N)+1)<>"1"
IF MID$(M$,CC+OF(N)*2+1)<>"0"
NB(nn)=n
INC NN
ENDIF
ENDIF
NEXT N
if nn>1
color rot
else
color gelb
endif
box 4*(cc mod mw%),4*(cc div mw%),4*(cc mod mw%)+3,4*(cc div mw%)+3
showpage
IF NN>0
IF nn>1
COLOR rot
ELSE
COLOR gelb
ENDIF
BOX 4*(cc mod mw%),4*(cc div mw%),4*(cc mod mw%)+3,4*(cc div mw%)+3
SHOWPAGE
IF NN>0
O=OF(NB(INT(RANDOM(NN+1))))
if cc+o>0 and cc+o<len(m$)
IF cc+o>0 AND cc+o<len(m$)
POKE VARPTR(M$)+CC+O,ASC("0")
line 4*(cc mod mw%)+2,4*(cc div mw%)+2,4*((cc+o) mod mw%)+2,4*((cc+o) div mw%)+2
endif
if cc+o*2>0 and cc+o*2<len(m$)
LINE 4*(cc mod mw%)+2,4*(cc div mw%)+2,4*((cc+o) mod mw%)+2,4*((cc+o) div mw%)+2
ENDIF
IF cc+o*2>0 AND cc+o*2<len(m$)
POKE VARPTR(M$)+CC+O*2,ASC("0")
endif
if nn>1 and cc>0
ENDIF
IF nn>1 AND cc>0
STK$=MKL$(CC)+STK$
endif
if cc+2*o>0 and cc+2*o<len(m$)
ENDIF
IF cc+2*o>0 AND cc+2*o<len(m$)
ADD CC,O*2 ! new position
GOTO 340
endif
ENDIF
ENDIF
IF STK$<>""
IF STK$<>""
CC=CVL(STK$)
STK$=right$(STK$,len(STK$)-4)
GOTO 340
......@@ -233,8 +233,8 @@ PROCEDURE mazegen
MAP(mw%-1,mh%-2)=0
RETURN
PROCEDURE init_palette
' SET UP PALETTE
dim palette(8)
' SET UP PALETTE
DIM palette(8)
rot=COLOR_RGB(1,0,0)
gelb=COLOR_RGB(1,1,0)
schwarz=COLOR_RGB(0,0,0)
......@@ -259,7 +259,7 @@ PROCEDURE minimap
FOR fy%=ay% TO MIN(ay%+mmh%,mh%-1)
IF MAP(fx%,fy%)=0
COLOR schwarz
ELSE
ELSE
COLOR metallic
ENDIF
PBOX (fx%-ax%)*8,(fy%-ay%)*8,(fx%-ax%)*8+7,(fy%-ay%)*8+7
......
' 3D-grafics benchmark (c) Markus Hoffmann,
' 3D-grafics benchmark (c) Markus Hoffmann,
' die Idee und das Programm kommt noch aus der ATARI-ST Zeit (ca. 1991)
'
' uses polygon and polyfill commands
......@@ -22,8 +22,8 @@ CLIP bx%,by%,bw%,bh%
bx%=0.1*bw%
by%=0.1*bh%
sub bw%,2*bx%
sub bh%,2*by%
SUB bw%,2*bx%
SUB bh%,2*by%
' Koordinaten:
'
......@@ -40,16 +40,16 @@ sy=0.03
sz=0.1
'
'
ebene=0 ! Projektionsebene (y-Koordinate)
ebene=0 ! Projektionsebene (y-Koordinate)
prozy=-4 ! Projektionszentrum
prozx=0
prozz=0
'
stx=0.8 ! Beobachterstandpunkt
stx=0.8 ! Beobachterstandpunkt
sty=-0.9
stz=0.8
'
bbx=-1 ! Beobachterblickrichtung
bbx=-1 ! Beobachterblickrichtung
bby=1
bbz=-1
'
......@@ -66,10 +66,10 @@ lichtr=50000
lichtg=65535
lichtb=65535
'
clearw 1
color grau
pbox bx%,by%,bw%,bh%
color weiss
CLEARW 1
COLOR grau
PBOX bx%,by%,bw%,bh%
COLOR weiss
pxU(0)=@kx(x1,y2,z1/2)
pyU(0)=@ky(x1,y2,z1/2)
pxU(1)=@kx(x2,y2,z1/2)
......@@ -79,7 +79,7 @@ pyU(2)=@ky(x2,y2,z2/2)
pxU(3)=@kx(x1,y2,z2/2)
pyU(3)=@ky(x1,y2,z2/2)
POLYFILL 4,pxU(),pyU()
color schwarz
COLOR schwarz
POLYLINE 4,pxU(),pyU()
pxU(0)=@kx(x1,y2,z1/2)
pyU(0)=@ky(x1,y2,z1/2)
......@@ -89,16 +89,16 @@ pxU(2)=@kx(x1,y1,z2/2)
pyU(2)=@ky(x1,y1,z2/2)
pxU(3)=@kx(x1,y1,z1/2)
pyU(3)=@ky(x1,y1,z1/2)
color weiss
COLOR weiss
POLYFILL 4,pxU(),pyU()
color blau
for i=z1/2 to z2/2 step (z2-z1)/12
COLOR blau
FOR i=z1/2 TO z2/2 STEP (z2-z1)/12
LINE @kx(x1,y1,i),@ky(x1,y1,i),@kx(x1,y2,i),@ky(x1,y2,i)
LINE @kx(x1,y2,i),@ky(x1,y2,i),@kx(x2,y2,i),@ky(x2,y2,i)
next i
color gelb
text bx%+20,by%+20,"3D - Flaechengrafik mit X11-Basic (c) Markus Hoffmann"
color schwarz
NEXT i
COLOR gelb
TEXT bx%+20,by%+20,"3D - Flaechengrafik mit X11-Basic (c) Markus Hoffmann"
COLOR schwarz
LINE @kx(x1,y1,0),@ky(x1,y1,0),@kx(x1,y2,0),@ky(x1,y2,0)
LINE @kx(x1,y2,0),@ky(x1,y2,0),@kx(x2,y2,0),@ky(x2,y2,0)
POLYLINE 4,pxU(),pyU()
......@@ -112,13 +112,13 @@ FOR y=y2 DOWNTO y1 STEP sy
ENDIF
yy=y
FOR x=x1 TO x2 STEP sx
' print x,y
' print x,y
z=@f(x,y)
zz=@f(x+sx,y)
zzz=@f(x,y+sy)
zzzz=@f(x+sx,y+sy)
' LINE @kx(x,y,z),@ky(x,y,z),@kx(x+sx,y,zz),@ky(x+sx,y,zz)
' LINE @kx(x,y,z),@ky(x,y,z),@kx(x,y+sy,zzz),@ky(x,y+sy,zzz)
' LINE @kx(x,y,z),@ky(x,y,z),@kx(x+sx,y,zz),@ky(x+sx,y,zz)
' LINE @kx(x,y,z),@ky(x,y,z),@kx(x,y+sy,zzz),@ky(x,y+sy,zzz)
pxU(0)=@kx(x,y,z)
pyU(0)=@ky(x,y,z)
pxU(1)=@kx(x+sx,y,zz)
......@@ -136,14 +136,14 @@ FOR y=y2 DOWNTO y1 STEP sy
nnx=nx/SQR(nx^2+ny^2+nz^2)
nny=ny/SQR(nx^2+ny^2+nz^2)
nnz=nz/SQR(nx^2+ny^2+nz^2)
' DEFLINE ,1,2,1
' LINE @kx(x+sx/2,y+sy/2,z),@ky(x+sx/2,y+sy/2,z),@kx(x+sx/2+nnx,y+sy/2+nny,z+nnz),@ky(x+sx/2+nnx,y+sy/2+nny,z+nnz)
' DEFLINE ,0,0
' DEFLINE ,1,2,1
' LINE @kx(x+sx/2,y+sy/2,z),@ky(x+sx/2,y+sy/2,z),@kx(x+sx/2+nnx,y+sy/2+nny,z+nnz),@ky(x+sx/2+nnx,y+sy/2+nny,z+nnz)
' DEFLINE ,0,0
colorwink=nnx*lichtx+nny*lichty+nnz*lichtz
IF colorwink<0
color schwarz
COLOR schwarz
ELSE
color get_color(colorwink*lichtr,colorwink*lichtg,colorwink*lichtb)
COLOR get_color(colorwink*lichtr,colorwink*lichtg,colorwink*lichtb)
ENDIF
POLYFILL 4,pxU(),pyU()
NEXT x
......@@ -152,12 +152,12 @@ FOR y=y2 DOWNTO y1 STEP sy
NEXT y
'
' BSAVE "E:\ablage\funktion.doo",XBIOS(3),32000
print timer-tim;" Sekunden."
alert 0,"Done !",1," OK |QUIT",balert
if balert=2
quit
endif
end
PRINT timer-tim;" Sekunden."
ALERT 0,"Done !",1," OK |QUIT",balert
IF balert=2
QUIT
ENDIF
END
'
'
DEFFN f(x,y)=0.8*EXP(-2*(x^2+y^2))*COS((x^2+y^2)*10)
......@@ -165,7 +165,7 @@ DEFFN f(x,y)=0.8*EXP(-2*(x^2+y^2))*COS((x^2+y^2)*10)
' Koordinatentransformationen mit Perspektive:
FUNCTION kx(x,y,z)
LOCAL xx
' Verschiebe an den Beobachterstandpunkt
' Verschiebe an den Beobachterstandpunkt
x=x-stx
y=y-sty
z=z-stz
......@@ -182,21 +182,20 @@ FUNCTION kx(x,y,z)
'
'
' Neigung:
' xx=x
' xx=x
x=COS(nwink)*x+SIN(nwink)*z
' z=-SIN(nwink)*xx+COS(nwink)*z
' z=-SIN(nwink)*xx+COS(nwink)*z
'
' Perspektive:
' py=(z-prozz)*(ebene-prozy)/(y-prozy)
' py=(z-prozz)*(ebene-prozy)/(y-prozy)
px=(x-prozx)*(ebene-prozy)/(y-prozy)
'
RETURN bx%+bw%/2+px*bw%/(x2-x1)
ENDFUNC
FUNCTION ky(x,y,z)
LOCAL xx
' Verschiebe an den Beobachterstandpunkt
' Verschiebe an den Beobachterstandpunkt
x=x-stx
y=y-sty
z=z-stz
......@@ -211,10 +210,10 @@ FUNCTION ky(x,y,z)
'
' Neigung:
xx=x
' x=COS(nwink)*x+SIN(nwink)*z
' x=COS(nwink)*x+SIN(nwink)*z
z=-SIN(nwink)*xx+COS(nwink)*z
' persp
py=(z-prozz)*(ebene-prozy)/(y-prozy)
' px=(x-prozx)*(ebene-prozy)/(y-prozy)
' px=(x-prozx)*(ebene-prozy)/(y-prozy)
RETURN by%+bh%/2-py*bh%/(z2-z1)
ENDFUNC
......@@ -65,7 +65,7 @@ prozx=0
prozz=0
'
stwink=(5*bildcount)*PI/180
stx=COS(stwink) ! Beobachterstandpunkt
stx=COS(stwink) ! Beobachterstandpunkt
sty=SIN(stwink)
stz=0.8
'
......@@ -109,7 +109,7 @@ IF bildcount>=72
SHOWPAGE
PAUSE 0.02
NEXT i
LOOP
LOOP
ENDIF
IF NOT EXIST(imgpath$+"welt.xxx")
......@@ -125,9 +125,9 @@ DO
t=TIMER
stwink=(5*bildcount)*PI/180
stx=COS(stwink) ! Beobachterstandpunkt
stx=COS(stwink) ! Beobachterstandpunkt
sty=SIN(stwink)
bbx=-COS(stwink) ! Beobachterblickrichtung
bbx=-COS(stwink) ! Beobachterblickrichtung
bby=-SIN(stwink)
zwink=SGN(bby)*SGN(bbx)*ATN(ABS(bbx/bby))+PI*ABS(bby<0)
xwink=-SGN(bbz)*ATN(ABS(bbz/SQR(bbz^2+bby^2)))
......@@ -142,14 +142,14 @@ DO
TEXT 400,130,STR$(sortzeit)
TEXT 400,150,STR$(plotzeit)
COLOR schwarz
PBOX 400,170,400+4*50,178
PBOX 400,190,400+10*20,198
PBOX 400,170,400+4*50,178
PBOX 400,190,400+10*20,198
COLOR gelb
PBOX 400,170,400+sortzeit*50,178
PBOX 400,190,400+plotzeit*20,198
PBOX 400,170,400+sortzeit*50,178
PBOX 400,190,400+plotzeit*20,198
COLOR weiss
BOX 400,170,400+4*50,178
BOX 400,190,400+10*20,198
BOX 400,170,400+4*50,178
BOX 400,190,400+10*20,198
SHOWPAGE
SAVEWINDOW imgpath$+"bild"+STR$(bildcount,3,3,1)+".bmp"
INC bildcount
......@@ -199,7 +199,7 @@ PROCEDURE calc
PRINT "calculate surfaces ..."
SHOWPAGE
t=CTIMER
' goto kug
' goto kug
FOR y=y2 DOWNTO y1 STEP sy
yy=y
FOR x=x1 TO x2 STEP sx
......@@ -210,9 +210,9 @@ PROCEDURE calc
@addfl(x,y,z,x+sx,y,zz,x+sx,y+sy,zzzz,x,y+sy,zzz)
NEXT x
NEXT y
PRINT anzfl;" elements in ";CTIMER-t;" Sekunden."
PRINT anzfl;" elements in ";CTIMER-t;" seconds."
SHOWPAGE
kug:
kug:
LOCAL r,spsp,st,phi,theta,x1,x2,x3,x4,y1,y2,y3,y4,z1,z2,z3,z4
......@@ -231,16 +231,17 @@ kug:
NEXT phi
NEXT theta
torus:
torus:
GPRINT anzfl;" Flächen. in ";CTIMER-t;" Sekunden."
GPRINT anzfl;" pieces in ";CTIMER-t;" seconds."
SHOWPAGE
RETURN
PROCEDURE sort
LOCAL a,i,mx,my,mz,flb,t,adr,badr,ad,j
PRINT "calculate distances ..."
FOR i=0 TO anzfl-1
PRINT "calculate distances ... ";
FLUSH
FOR i=0 TO anzfl-1
mx=(welt(6+13*i)+welt(13*i))/2
my=(welt(7+13*i)+welt(1+13*i))/2
mz=(welt(8+13*i)+welt(2+13*i))/2
......@@ -248,9 +249,10 @@ PROCEDURE sort
dist(i)=-welt(12+13*i)
index%(i)=i
NEXT i
PRINT "SORT:"
PRINT "SORT ... ";
FLUSH
SORT dist(),anzfl,index%()
PRINT "SWAPPING:"
PRINT "SWAPPING ... "
adr=VARPTR(welt(0))
ad=8*13
t=CTIMER
......@@ -259,7 +261,7 @@ PROCEDURE sort
FOR i=0 TO anzfl-1
j=index%(i)
BMOVE adr2+ad*j,adr+ad*i,ad
flb=TRUE
flb=TRUE
IF CTIMER-s>0.5
@progress(anzfl,i)
FLUSH
......@@ -267,12 +269,15 @@ PROCEDURE sort
ENDIF
NEXT i
@progress(anzfl,i)
PRINT
PRINT "in ";ctimer-t;" Sekunden."
PRINT CHR$(13);"in ";ctimer-t;" seconds."
SHOWPAGE
RETURN
PROCEDURE save
PRINT "--> "+imgpath$+"welt.xxx"
OPEN "O",#1,imgpath$+"welt.xxx"
IF LEN(meldung$)<64
meldung$=meldung$+STRING$(64,".")
ENDIF
BPUT #1,VARPTR(meldung$),64
BPUT #1,VARPTR(anzfl),8
BPUT #1,VARPTR(sortstart),8
......@@ -280,13 +285,13 @@ PROCEDURE save
CLOSE #1
RETURN
PROCEDURE load
open "I",#1,imgpath$+"welt.xxx"
meldung$=SPACE$(68)
BGET #1,VARPTR(meldung$),64
PRINT "<-- "+imgpath$+"welt.xxx ";
OPEN "I",#1,imgpath$+"welt.xxx"
meldung$=INPUT$(#1,64)
PRINT "["+meldung$+"] ";
BGET #1,VARPTR(anzfl),8
PRINT anzfl;" Flächen."
PRINT anzfl;" surfaces."
BGET #1,VARPTR(sortstart),8
PRINT meldung$
BGET #1,VARPTR(welt(0)),anzfl*8*13
CLOSE #1
SHOWPAGE
......@@ -339,7 +344,6 @@ PROCEDURE plot
nz=(welt(3+13*i)-welt(0+13*i))*(welt(10+13*i)-welt(1+13*i))-(welt(4+13*i)-welt(1+13*i))*(welt(9+13*i)-welt(0+13*i))
nl=SQR(nx^2+ny^2+nz^2)
' Zeige Normalenvektoren
nnx=nx/nl
nny=ny/nl
......@@ -365,7 +369,7 @@ PROCEDURE plot
pyU(3)=@ky(welt(9+13*i),welt(10+13*i),welt(11+13*i))
POLYFILL 4,pxU(),pyU()
IF TIMER-ptimer>1
SHOWPAGE
SHOWPAGE
@progress(anzfl,i)
ptimer=TIMER
ENDIF
......@@ -373,7 +377,7 @@ PROCEDURE plot
NEXT i
@progress(anzfl,i)
SHOWPAGE
PRINT "Plotted in ";ROUND(TIMER-plottime);" sec."
PRINT CHR$(13);"Plotted in ";ROUND(TIMER-plottime);" sec."
RETURN
'
DEFFN f(x,y)=0.8*EXP(-2*(x^2+y^2))*COS((x^2+y^2)*10)
......@@ -398,12 +402,12 @@ FUNCTION kx(x,y,z)
'
'
' Neigung:
' xx=x
' xx=x
x=COS(nwink)*x+SIN(nwink)*z
' z=-SIN(nwink)*xx+COS(nwink)*z
' z=-SIN(nwink)*xx+COS(nwink)*z
'
' Perspektive:
' py=(z-prozz)*(ebene-prozy)/(y-prozy)
' py=(z-prozz)*(ebene-prozy)/(y-prozy)
px=(x-prozx)*(ebene-prozy)/(y-prozy)
'
RETURN bx%+bw%/2+px*bw%/(x2-x1)
......@@ -425,14 +429,14 @@ FUNCTION ky(x,y,z)
'
' Neigung:
xx=x
' x=COS(nwink)*x+SIN(nwink)*z
' x=COS(nwink)*x+SIN(nwink)*z
z=-SIN(nwink)*xx+COS(nwink)*z
' persp
py=(z-prozz)*(ebene-prozy)/(y-prozy)
' px=(x-prozx)*(ebene-prozy)/(y-prozy)
' px=(x-prozx)*(ebene-prozy)/(y-prozy)
RETURN by%+bh%/2-py*bh%/(z2-z1)
ENDFUNC
procedure progress(a,b)
PROCEDURE progress(a,b)
PRINT chr$(13);"[";string$(b/a*32,"-");">";string$((1.03-b/a)*32,"-");"| ";str$(int(b/a*100),3,3);"% ]";
FLUSH
RETURN
cls
CLS
sx=100
sy=sx*42/60
DIM x(sx+1,sy+1)
......@@ -10,34 +10,34 @@ m=120
gelb=get_color(65535,65535,0)
gruen=get_color(10000,65535,10000)
print "Netzgraf von Markus Hoffmann 1987 "
PRINT "Netzgraf von Markus Hoffmann 1987 "
s=60/sx*4.5
clearw
CLEARW
LINE 200,0,639,0
LINE 200,0,0,100
color gelb
text 200,200,"Netzgraf von Markus Hoffmann 1987 "
color gruen
vsync
COLOR gelb
TEXT 200,200,"Netzgraf von Markus Hoffmann 1987 "
COLOR gruen
VSYNC
FOR i=0 TO sx
FOR j=0 TO sy
z=m*SIN(i/2/pi)*SIN(j/2/pi)
z=m*SIN(i/2/pi)*SIN(j/2/pi)
x(i,j)=200+(i-j)*2*s
y(i,j)=100+j*s-z
' print i,j,x(i,j),y(i,j)
NEXT j
PRINT i''chr$(13);
flush
FLUSH
NEXT i
LINE 200,0,200,y(0,0)
vsync
VSYNC
FOR i=sx DOWNTO 1
FOR j=sy DOWNTO 1
y(i-1,j-1)=MIN(y(i-1,j-1),y(i,j))
NEXT j
PRINT i''chr$(13);
flush
FLUSH
NEXT i
'FILL 1,21
FOR i=0 TO sx-1
......@@ -46,9 +46,9 @@ FOR i=0 TO sx-1
LINE x(i,j),y(i,j),x(i,j+1),y(i,j+1)
NEXT j
PRINT i''chr$(13);
flush
vsync
FLUSH
VSYNC
NEXT i
vsync
alert 0,"Fertig",1,"OK",balert
quit
VSYNC
ALERT 0,"Fertig",1,"OK",balert
QUIT
......@@ -48,7 +48,7 @@ NEXT phi
r=0.3
spsp=PI/10
st=PI/10
print
PRINT