Task

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.



Related tasks

 draw a cuboid
 draw a rotating cube
 write language name in 3D ASCII
 draw a Deathstar


 
(import (lib gl))
(import (OpenGL version-1-0))
 
; init
(glClearColor 0.3 0.3 0.3 1)
(glPolygonMode GL_FRONT_AND_BACK GL_FILL)
 
(define quadric (gluNewQuadric))
 
; draw loop
(gl:set-renderer (lambda (mouse)
   (glClear GL_COLOR_BUFFER_BIT)
 
   (glColor3f 0.7 0.7 0.7)
   (gluSphere quadric 0.4 32 10)
))
 