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
Bu iş için 4 freelancer ortalamada $21/saat teklif veriyor
Hello, sir! I have read your requirement and I noticed that I am appropriate to this project. As a skillful software developer, I have rich experience with OpenGL. I promise I will finish this project with high quality Daha Fazla
Hi, i read your job description carefully and i understood your requirements. I can do this job efficiently. Contact me to start work on this project.