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.
Next related
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.
Previous related
Day 7, Casting rays through the whole world
Lots of refactoring today, because old assumptions were smashed, and some cleanup of annoying duplications was needed. No new pixels yet, but maybe tomorrow? These where the previous two days pixel results, with the black background made transparent while converting them from ppm to png.
Day 6, Shadows, Light and Magic
More than just hit detection, we’ve moved into the realm of reflection, lighting and shading. This is mainly about projecting vectors on other vectors, using dot products \(\overrightarrow{v1} \cdot \overrightarrow{v2}\) to measure the length of the projection. For that we need to find normal vectors of surfaces, and a light source.
Day 5, Assume nothing
Today I Learned that I shouldn’t have assumed the sphere would ever need to change from being a unit sphere, so intersecting gets even simpler: