1
0
mirror of https://github.com/rfivet/BCG101.git synced 2024-12-23 18:46:52 -05:00
BCG101/port/3DPLOT.BAS

20 lines
455 B
QBasic
Raw Normal View History

2024-05-03 22:40:24 -04:00
5 DEF FNA(Z)=30*EXP(-Z*Z/100)
10 ' DEF FNA(Z)=SQR(900.01-Z*Z)*.9-2
20 ' DEF FNA(Z)=30*(COS(Z/16))^2
30 ' DEF FNA(Z)=30-30*SIN(Z/18)
40 ' DEF FNA(Z)=30*EXP(-COS(Z/16))-30
50 ' DEF FNA(Z)=30*SIN(Z/10)
100 PRINT
110 FOR X=-30 TO 30 STEP 1.5
120 L=0
130 Y1=5*INT(SQR(900-X*X)/5)
140 FOR Y=Y1 TO -Y1 STEP -5
150 Z=INT(25+FNA(SQR(X*X+Y*Y))-.7*Y)
160 IF Z<=L THEN 190
170 L=Z
180 PRINT TAB(Z)"*";
190 NEXT Y
200 PRINT
210 NEXTX
300 END