Draw a sphere: Difference between revisions

(→‎{{header|C}}: disclaimer)
Line 2:
 
The task is to draw a sphere. The sphere can be represented graphically, or in ascii art, depending on the language capabilities. Either static or rotational projection is acceptable for this task.
 
=={{header|BASIC}}==
 
{{works with|QBasic}}
 
<lang QBASIC>
SCREEN 13 ' enter high-color graphic mode
 
' sets palette colors B/N
FOR i = 0 TO 255
PALETTE 255 - i, INT(i / 4) + INT(i / 4) * 256 + INT(i / 4) * 65536
NEXT i
PALETTE 0, 0
 
' draw the sphere
FOR i = 255 TO 0 STEP -1
x = 50 + i / 3
y = 99
CIRCLE (x, y), i / 3, i
PAINT (x, y), i
NEXT i
 
' wait until keypress
DO: LOOP WHILE INKEY$ = ""
END
</lang>
 
=={{header|Brlcad}}==
Anonymous user