7.6. Smooth shading
In order to be able to describe curved surfaces efficiently, a smooth shading feature is implemented in the RadiCal method. In the context of the RadiCal raytracer, the term smooth shading is somewhat misleading, as the surfaces are not actually shaded. However, the term mostly refers to the same principles when used in computer graphics. Technically, smooth shading is an interpolation method for surface normal vectors on curved surfaces. The idea dates back to an algorithm introduced
by Henri Gouraud (1971) and is fairly simple: it
assumes that the surface normal vectors on a
smooth surface change continuously but are explicitly defined at the vertices of the surface mesh only.
Linear interpolation is applied to derive the surface
normal vector at any point of the given normal vectors of the surrounding vertices. A threshold value
usually determines if smooth shading is applied on
a face. It is defined as a maximum angle (dot product of surface normal vectors) that determines if the
face is part of a curved surface or represents an edge
of the object. In the latter case, no smooth shading
is applied.
The integration into the RadiCal raytracing algorithm is simple, as the implemented collision detection algorithm (see above) already provides barycentric coordinates for the collision point inside a triangular face. Hence, the linearly interpolated surface normal vector 𝑛⃗ 𝑃 at the collision point 𝑃 (see Figure 101) can be found by:

The smooth shading feature is a simple but essential feature of the RadiCal method. It significantly improves the raytracer’s performance (or accuracy), as considerably fewer vertices are required to accurately model the reflection of curved surfaces (e.g. the lamellae of shades).

