That's the mega tedious part that's no-fun to debug. It's usually where my raytracer projects end haha
What also helps a lot is that you can use only spheres to create a Cornell box (use very large spheres for the walls). And ray-sphere intersection is 'easy'.
Then the next step is path tracing. This will help you to learn a lot about handling recursion (with or without recursion).
Other areas that you learn:
+ How scope is handled
+ (In dynamic languages) how the conversion between floats and ints work.
+ Multi threading
Path tracing doesn't trace towards light sources for shadow rays and instead just sends several rays in different directions and accumelates the resulting colors of those rays.
(But it seems like every person you ask knows a different meaning for terms like raycasting, path tracing and physical based rendering)
* shoot a ray from the pixel
* when the ray hits an object check how much light that point receives
* bounce the ray according to the hit material properties
* repeat the bounces X times and gather how much light the pixel will receive.
Because most bounes are in a random direction it's best to sample a pixel multiple times. And ofcourse more bounces give a more realistic global illumination result.
+ Protocols/traits/interfaces and using that for polymorphishm, think intersectable/primitve types.
+ It typicall involves both understanding heap and stack allocated memory in the language as well as understanding the general memory model to build scene graphs etc
+ Building a small linear algebra library usually touches things like low level operations and performance operations as well as operator overloading if the language supports it.
+ Writing images to disks via pixel buffers
Primarily though I think raytracers are very fun projects because you can produce nice looking results quickly which I find helps with motivation and passion for the project. I'm pretty pleased with some of my renders already[1]
0: https://github.com/k0nserv/rusttracer
1: https://raw.githubusercontent.com/k0nserv/rusttracer/master/...