Day 18 – 21, Feverish Shiny Glass Pixels
Got hit with a sudden fever on Tuesday eveing, so that put a halt on things, while spending 2½ days sleeping that off. Also, refractions took more work than I had anticipated. I didn’t think about the fact that Snell’s law for calculating the angle of the refracted ray, only does what it says on the tin. In reality the refraction and reflection is a duality, tapering off from one to the other as you get close to the critical angle where everything is reflected, due to the Fresnel effect.
Next related
Day 22, Murky waters
Remember when we introduced shadows? Casting a ray towards the light and see if any object is in the way. Well, that’s a huge shortcut, because transparent materials. Well, why not fix that by taking another huge shortcut, and add a toggle to exclude certain objects from shadow ray casting?
Previous related
Day 17, Transparency and Refraction
No new pixels today, because implementing transparency and refraction turned out to be quite a lot of work. So far I’ve made all the cases where nothing happens, and the refracted ray would be black.
Day 16, Halfway there
Fitting that the halfway point would be about reflections. Pagewise we’re more than halvway through the book, but I’m guessing that there will be plenty of things to do for the remaining 15 days. There’s still the going back and replacing the homebuilt algebra code with stdlib, if nothing else.