Ray Tracing in a Weekend Part 2 - The vec3 class

The vec3 class In part 1 I made a simple image by assigning rgb values to individual variables in a loop across the x- and y-coordinates. This example produces the same image, but introduces the vec3 class used to perform calculations with 3-dimensional vectors and access them as x, y, z-coordinates or r, g, b-color values. The code below is complete, but feel free to download the complete repo from https://github.
Read more...

Ray Tracing in a Weekend Part 1 - Intro and First Simple Image

Introduction In the next few posts I want to document my journey through Peter Shirley’s book Ray Tracing in a Weekend and its two following volumes Ray Tracing - The Next Week and Ray Tracing - The Rest of Your Life (now available for free). I found the first book on Amazon Kindle quite a long time ago, but then I always had to put it on the backburner because I had to finish other courses first.
Read more...