There’s not much cooler than Raytracing. Making photoeralistic (or a little too perfect-istic) images on you computer is definitely cool.
A bagillion years ago, I dove into raytracing and made my own. It was AP Calculus in high school when I realized that gradients lead to surface normals. Shocker!
Anyway, I dug out the old codebase and dusted it off (turns out Turbo C++ is a little different from gcc 10). Substituted OpenCV for BGI and BAM, Raytracer Resurrection.
Still got it.
Let the images speak for themselves:
I can VIVIDLY remember the night I got it working. To see the shaded ellipsoidal surface that took several minutes to draw was a pretty cool feeling. Yeah, it was an ellipsoid (technically a prolate ellipsoid), not a sphere.
Here’s the refracted version:
Recursive reflection kind of falls out naturally
Leave a Reply