http://sidneys77crlfslcr7zmj3msmxchgnxhrxlp3p3kbaswo7twchjnicid.onion/programming/2022/03/23/raytracing.html
We’ll also give our Sphere a solid olc::GREY color,
and set the radius to 100 . - shapes.emplace_back(std::make_unique<Sphere>()); + shapes.emplace_back(std::make_unique<Sphere>(vf3d(0, 0, 200), olc::GREY, 100)); Finally, using our newly created ray type, let’s construct a ray in Sample for a given pixel that will point into
the scene: // Create a ray casting into the scene from this "pixel". ray sample_ray ({ x , y , 0 }, { 0 , 0 , 1 }); // TODO: We now need to test if this ray hits any...