It was my intention to create an accurate 3d lighting representation of the surface describe in 50000 Rectangles #8.
I defined a point in space for the eye, and points for one or more light sources. I assigned brightness to the light source, reflectivity to the surface. I added parameters for degrees of diffusion and spot light cone size, and several other things.
For a given pixel I use the pixel to the left and the pixel above to create a triangle in 3D space. Then the surface normal to the triangle is calculated, and from that the angles to the eye and the light.