Day 11, Into the Shadows
After todays work we can render the shadows cast by objects in our scenes!
Finding out which points are in shadow is actually pretty neat, just cast a ray toward the light, and see if it hits anything else on the way. If the light is obscured, the point just gets ambiant light. When lit by multiple lights, the whole thing is just done separately for each light, and added in the end.
Next related
Day 12, Spheres on a plane
Spheres are nice and all, but we need more shapes to make the world go around. So, a little bit of refactoring to get most the juicy bits from spheres apply to every kind of shape, such as planes. So flat, and infinite.
Previous related
Day 10, A world full of spheres
With the development environment fixed, using the previous progress to render a world with multiple is as simple as creating the camera:
Day 9, lost to Ruby environment trouble
No progress because it turned out that the Ruby / bundler environment on my laptop was not functional anymore, so the little time I had while away over the weekend got wasted on debugging why nothing worked instead of doing something productive.
Day 8, Making a scene
Further steps toward more pixels, teaching the world to tell what color a ray will see, and creating the necessary transforms for positioning the world in front of the camera. Then have the camera cast a ray, for each pixel in the resulting image, into the world.