How to draw a sphere

This code is adapted from Learning WebGL lesson 11, which in turn adapted it from this demo by the WebKit team.