The 2D Reflection applet is an interactive illustration letting users reposition a light source and automatically recalculate the reflection vector. The standard equation is used with N, L and R for, respectively, the surface normal, normalized direction to a light source, and normalized reflection of L off of a surface. All equations are automatically updated with a user's changes to the illustration. A series of tips/concept explanations are available.This applet helps enhance complete understanding of essential task.
The 2D Reflection applet was developed for use in an undergraduate computer graphics programming course and is appropriate chiefly for computer science students and other students who need to calculate light reflection. The mathematics depends only on simple algebra and trigonometry.
The light source vector (shown in red) and the surface normal (green) can be dragged by the user. This affects the reflection vector (yellow) and the orientation of the surface (gradated arc). The equation is derived at the bottom and coordinate values are substituted for the equation variables at the very end. The user can also press the "Tips" button to display hints and exercises in the help field.