RayTrace-render a scene containing a Sphere.
For the following pinhole camera description and the scene (containing a single AABB) modify the pixelColor function of the raytracing template to compute color of the sphere that is visible through each pixel. Assume that the sphere diameter is 1 unit and is centered at (0,0,0).
Camera: Assume that the camera is positioned 1.25 units away along the Z axis, looking at the origin, and Y-axis as the camera Up vector, and has a vertical field of view of 75 degrees.
At = [0, 0, 0]
Up = [0, 1, 0]
Eye = [0, 0, 1.25]
FOV = 75
For color assignment use the simple shading technique:
If the sphere is visible through the pixel then
color = the absolute value of the normal vector at the point of the sphere visible to the camera
else color = background-color