BBC Micro – Circular 3D plot
bbc12301876815_d934e30954_c


100 REM Circular 3D plot program
110 MODE1
120 GCOL0,2
130 VDU19,0,4,0,0,0
140 GCOL0,128:CLG
150 K=5*PI/10000
160 DEF FNA(Z)=10*SIN(K*(X*X+Y*Y))
170 FOR X=-100 TO 100 STEP 2
180 Z1=0
190 Y1=5*INT(SQR(10000-X*X)/5)
200 FOR Y=Y1 TO -Y1 STEP -5
210 Z=INT(80+FNA(SQR(X*X+Y*Y))-.707*Y)
220 IF Z<Z1 THEN 270
230 Z1=Z
240 SX=640+5*X
250 SZ=300+3*Z
260 PLOT69,SX,SZ
270 NEXT Y
280 NEXT X
290 END