Research and Implementation of Ray Tracing Algorithm
Abstract
In computer graphics, the technology of realism plays an important role. The graphics made by realistic technology can reflect minor changes in the surface brightness and colors, which can show the surface texture of an object. By generating the shadow of the light, it improves the sense in depth and gradation of the scene, and reflects the relation of mutual occlusion between objects. Also, realistic technology can simulate transparent objects and mirror effect.
Ray-tracing algorithm is one of the most important algorithms of realistic generation technology. It used a whole light model to simulate the illumination condition of the scene. Ray-tracing can solve all the issues about hiding, shadow, specula reflection and refraction unaffectedly, and can product a very vivid graphics. The ray-tracing algorithm is hard to understand, but it can be achieved by recursion. The amount of calculation of ray-tracing algorithm is very huge. So, how to minimize the intersection calculation is the key to improving efficiency of the ray-tracing algorithm.
Starting with the simple light model, this paper researched the ray-tracing algorithm, including the ray-tracing theory, the procedure of ray tracing, and the algorithms of calculating intersection. Depending on the basic theory of ray-tracing algorithm, this paper realized a small-scale demo under the framework of MFC, using the C++ and Windows GDI. The demo set up a 3D scene, and put some objects in it. Then, it can simulate the illumination effect by ray-tracing algorithm.