Reflection lines


Engineers use reflection lines to judge a surface's quality. Reflection lines reveal surface flaws, particularly discontinuities in normals indicating that the surface is not. Reflection lines may be created and examined on physical surfaces or virtual surfaces with the help of computer graphics. For example, the shiny surface of an automobile body is illuminated with reflection lines by surrounding the car with parallel light sources. Virtually, a surface can be rendered with reflection lines by modulating the surfaces point-wise color according to a simple calculation involving the surface normal, viewing direction and a square wave environment map.

Mathematical Definition

Consider a point on a surface with normal. If an observer views this point from infinity at an incoming direction then the reflected view direction is:
For reflection lines we consider repeated infinite, non-dispersive light sources parallel to some line and therefore perpendicular to a plane. Define the vector to be the reflection direction projected onto the plane :
and similarly let be the unit viewing direction projected onto :
Finally, define to be the direction lying in perpendicular to and :
Then the *reflection line function* is a scalar function mapping points on the surface to angles between and the projected reflected view direction :
where is the atan2 function producing a number in the range.
Finally, to render the reflection lines positive values are mapped to a light color and non-positive values to a dark color.

Highlight lines

Highlight lines are a view-independent alternative to reflection lines. Here the projected normal is directly compared against some arbitrary vector perpendicular to the light source:
where is the surface normal projected on the light source plane :
The relationship between reflection lines and highlight lines is likened to that between specular and diffuse shading.