What are you watching?
A ray reflects from the sides of a regular polygon by reversing the component of its direction perpendicular to each wall. The path is computed from geometric line intersections.
Change one thing. Watch what happens.
- Start the simulation, then pause to inspect the pattern.
- Change one control at a time and compare the result with your prediction.
- Reset to repeat the demonstration. Use fullscreen for a closer view and the sound control to choose whether to listen.