I am sorry that I was very busy last week. However, I managed to finish the coding today.
The default configuration for the following simulation is the same as what you want.
The design of the coding is totally different from the above one.
However, it can be used to simulated many faces polygon,too!
The slider at the top can be used to adjust minimum intensity ray to be drawn/calculated in the simulation.

Please check out [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=1445.msg5475#msg5475]Ray tracing for laser light[/url]