# A Comprehensive Survey of Isocontouring Methods: Applications, Limitations and Perspectives
## 5 Ray Tracing Algorithms  
In connection with the algorithms described previously, a related class of methods is often used for the visual representation of primarily three-dimensional scenes. The so-called ray tracing techniques are a frequently used method in the field of computer graphics for the generation of realistic light and shadow effects and thus contribute to a realistic representation of three-dimensional objects, as is the case with rendering, for example. Accordingly, the calculation of the isosurfaces precedes the application of ray tracing, but this method certainly offers added value with regard to the visual representation of simulation results, for instance. The basic idea of ray tracing is to expose the (previously calculated) isosurfaces to artificial light rays from a virtual light source and to observe the course of the light rays in order to determine the lighting conditions in the image; see Figure 10.  
In the first step, the image is divided into pixels, whereby a ray is generated for each pixel of the image. Here, the ray is described by a parameterized line in Equation (11), which is defined by two points \(\mathbf{x}_{1},\mathbf{x}_{2}\in\mathbb{R}^{d},d\in\{2,3\}\) and a scaling factor \(\lambda\in\mathbb{R}\)[55]. \[\mathbf{p}(\lambda)=(1-\lambda)\mathbf{x}_{1}+\lambda\mathbf{x}_{2} \tag{11}\]  
This ray then travels from the viewer through the pixel into the respective scene and represents the viewer's line of sight. The generated rays are of particular importance in this context, as they are used to calculate the light and shadow ratios. The rays are followed as they propagate through the scene and their interaction with the objects in the scene is observed. Here, we are particularly interested in where the ray intersects the corresponding scene. In the event that the ray has crossed an object in the scene, it is then checked whether this point is in shadow. This is done by determining whether the point is illuminated by a light source. If, for example, an obstacle blocks the direct connecting line between the point and the light source, the point is in the shadow. In the event that the point is not in shadow, lighting calculations are subsequently carried out that take into account, among other aspects, the incident ambient light and the effects caused by the irradiation of direct and indirect light resulting from reflections. Other influencing variables in this context are, for example, the surface properties, which take into account the respective color tones and the reflexion coefficients. The stored reflexion coefficients can be used to determine whether the ray hits a reflective surface. If this is the case, a new reflexion ray is generated and the entire process is repeated for this ray. For transparent materials, on the other hand, a refracted ray is generated. The calculated color values for each ray are accumulated to obtain the final color value for the pixel. In the event that reflections or refractions occur, the described process is continued recursively, which means that, for each reflected or refracted ray, the ray tracing process is performed again. The entire process is then repeated for each pixel on the image surface to obtain the final image. As mentioned above, the ray tracing method offers the possibility of displaying realistic scenes. However, this is counteracted by the high level of computational effort.