Sorry for the pun in the title, but I'm thinking of rendering a light sourced sphere in JavaScript on the canvas.
After looking at some generic methods for light sourcing, I've figured out how to calculate the brightness for each polygon in a fast way:
1. Calculate the distance of each point on the sphere from the light source in 3D space.
2. Assign each point a brightness value.
3. For each polygon, add up the brightness value for each point on that polygon.
4. Multiply that brightness value by the RGB colour for that polygon.
5. Draw the polygon, subject to backface culling.
It's a shame gouraud shading natively supported under JS.
Wish me luck!