Based on what we talked about today, you should be able to figure out how to make this simulation work ...
Also, today's lectures were based mostly on material from the Feynman lectures:
Volume III, Ch. 4 (Ch. 3 as a reminder)
Volume I, Ch. 42 (Ch. 40, 41 as a reminder)
I also made use of Solymar & Walsh (Ch. 12) for specific examples of laser systems. Again, note the (now 10 part) series on cool laser applications over here.