Skip to content

Instantly share code, notes, and snippets.

@fiskurgit
Created February 4, 2014 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiskurgit/8803490 to your computer and use it in GitHub Desktop.
Save fiskurgit/8803490 to your computer and use it in GitHub Desktop.
BBC Basic plot
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment