Draw a sphere: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: workaround for writing text before binary data) |
(Added ZX81 BASIC) |
||
Line 803: | Line 803: | ||
#g circle(75) 'make a circle with radius 75 |
#g circle(75) 'make a circle with radius 75 |
||
render #g 'show it</lang> |
render #g 'show it</lang> |
||
=={{header|Sinclair ZX81 BASIC}}== |
|||
Works with 1k of RAM. A screenshot of the output is [http://www.edmundgriffiths.com/zx81sphere.jpg here]. |
|||
<lang basic>10 LET I=21 |
|||
20 LET J=2 |
|||
30 FOR K=-PI TO PI STEP 0.07 |
|||
40 PLOT 21+I*SIN K,22+21*COS K |
|||
50 PLOT 21+21*SIN K,22+(I-1)*COS K |
|||
60 NEXT K |
|||
70 LET I=I-J |
|||
80 LET J=J+1 |
|||
90 IF I>0 THEN GOTO 30</lang> |
|||
=={{header|Batch File}}== |
=={{header|Batch File}}== |