I'm going on with my own ray tracer as an iPad app for a school project. This is the result with soft shadow, antialiasing, pure reflective and pure transparent object:
Now i want to change the skybox, implemented with the method contained here http://www.ics.uci.edu/~gopi/CS211B/RayTracing%20tutorial.pdf with a real cube that wrap all the scene. In this way I can display the soft shadow projected on the floor. I read a lot of documentation about ray tracing polygon and I understood how to check if the ray intersect the polygon plane. Now my question is: if I want to draw a square, one for each side of my cube that will wrap the scene, how do I check if the point of intersecton is inside the square/polygon (so that i can shade it)? All the documentation seems so vague and incomplete. I can't find a complete explanation with some example, and maybe with some pseudo code, that really explain how to draw a square (bounded plane) in a ray tracer.
Thanks for helping me.
t=normal.Dot(origin-posR)/normal.Dot(direction)
and then just determine whether it lies within using (u,v) coordinates. \$\endgroup\$