This was an interesting idea I came up with after learning about line-plane intersections in my MV/LA class at school. I knew how ray tracing worked, but independently came up with equations and all the code to run it.


Essentially, the camera casts out a bunch of rays and then returns a value based on whether a light-surface collision happened and the amount of light at that location (this part I had to research. I believed I used the Phong lighting model). The resulted is then printed out. It runs incredibly slowly and is not well optimized, but works well as a proof of concept. The icosahedron shown runs at about 1 frame/second.

Icosahedron rendered in text