Misplaced Pages

Reflection lines

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
This article is an orphan, as no other articles link to it. Please introduce links to this page from related articles; try the Find link tool for suggestions. (December 2017)

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 C 2 {\displaystyle C^{2}} . 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.

Reflection lines visualized on surfaces completed using a biharmonic and triharmonic equation with C 1 {\displaystyle C^{1}} and C 2 {\displaystyle C^{2}} surface continuity respectively. Derivative discontinuities near the yellow-purple boundary on the left reveal normal discontinuities. Below are pseudocolor visualizations of curvature.

Mathematical definition

Consider a point p {\displaystyle p} on a surface M {\displaystyle M} with (normalized) normal n {\displaystyle n} . If an observer views this point from infinity at view direction v {\displaystyle v} then the reflected view direction r {\displaystyle r} is:

r = v 2 ( n v ) n . {\displaystyle r=v-2(n\cdot v)n.}

(The vector v {\displaystyle v} is decomposed into its normal part v n = ( n v ) v {\displaystyle v_{n}=(n\cdot v)v} and tangential part v t = v v n {\displaystyle v_{t}=v-v_{n}} . Upon reflection, the tangential part is kept and the normal part is negated.)

For reflection lines we consider the surface M {\displaystyle M} surrounded by parallel lines with direction a {\displaystyle a} , representing infinite, non-dispersive light sources. For each point p {\displaystyle p} on M {\displaystyle M} we determine which line is seen from direction v {\displaystyle v} . The position on each line is of no interest.

Define the vector r p {\displaystyle r_{p}} to be the reflection direction r {\displaystyle r} projected onto a plane P {\displaystyle P} that is orthogonal to a {\displaystyle a} :

r p = r ( r a ) a {\displaystyle r_{p}=r-(r\cdot a)a}

and similarly let v p {\displaystyle v_{p}} be the viewing direction projected onto P {\displaystyle P} :

v p = v ( v a ) a {\displaystyle v_{p}=v-(v\cdot a)a}

Finally, define v o {\displaystyle v_{o}} to be the direction lying in P {\displaystyle P} perpendicular to a {\displaystyle a} and v p {\displaystyle v_{p}} :

v o = a × v p {\displaystyle v_{o}=a\times v_{p}}

Using these vectors, the *reflection line function* θ ( p ) : M ( π , π ] {\displaystyle \theta (p):M\rightarrow (-\pi ,\pi ]} is a scalar function mapping points p {\displaystyle p} on the surface to angles between v p {\displaystyle v_{p}} and r p {\displaystyle r_{p}} :

θ = arctan ( r p v o , r p v p ) {\displaystyle \theta =\arctan {(r_{p}\cdot v_{o},r_{p}\cdot v_{p})}}

where a r c t a n ( y , x ) {\displaystyle arctan(y,x)} is the atan2 function producing a number in the range ( π , π ] {\displaystyle (-\pi ,\pi ]} .

( v p {\displaystyle v_{p}} and v o {\displaystyle v_{o}} can be viewed as a local coordinate system in P {\displaystyle P} with x {\displaystyle x} -axis in direction v p {\displaystyle v_{p}} and y {\displaystyle y} -axis in direction v o {\displaystyle v_{o}} .)

Finally, to render the reflection lines positive values θ > 0 {\displaystyle \theta >0} 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 x {\displaystyle x} perpendicular to the light source:

θ = arctan ( n a a , n a x ) {\displaystyle \theta =\arctan {(n_{a}\cdot a^{\perp },n_{a}\cdot x)}}

where n a {\displaystyle n_{a}} is the surface normal projected on the light source plane P {\displaystyle P} :

n a ^ / | n a ^ | , n a ^ = n ( n a ) a {\displaystyle {\hat {n_{a}}}/|{\hat {n_{a}}}|,{\hat {n_{a}}}=n-(n\cdot a)a}

The relationship between reflection lines and highlight lines is likened to that between specular and diffuse shading.

References

  1. Gingold et al. "Shape Optimization Using Reflection Lines"
  2. Beier and Chen. "Highlight-line algorithm for realtime surface-quality assessment"
Categories: