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


/* Two solutions */
plot3d(1, [theta, 0, %pi], [phi, 0, 2 * %pi],
[transform_xy, spherical_to_xyz], [grid, 30, 60],
[box, false], [legend, false])$
 
load(draw)$
draw3d(xu_grid=30, yv_grid=60, surface_hide=true,
   parametric_surface(cos(phi)*sin(theta),
                      sin(phi)*sin(theta),
                      cos(theta),
                      theta, 0, %pi, phi, 0, 2 * %pi))$