Last weekend I have finished assignment_2.
This assignment adds ambient & normal shading to the raycast program of assignment 1.
Now 3D objects looks much more like 3D objects.
And, here is my code.
Now the objects looks like this. (3 graphics for each scene. From left to right: real, depth, normal[red:x, green:y, blue:z])
Figure 1. A Sphere with normal shading
Figure 3. Perspective Camera
Figure 4. Infinite Plane Object
Figure 5. Triangle
Figure 6. Triangle Mesh
Figure 7. Rotated Sphere
Figure 8. Transformed Sphere
Figure 9. Complex Triangle Mesh (n = 200)
Figure 11. Axies