Introduction - If you have any usage issues, please Google them yourself
This program is the 2013 National Graduate Mathematical Contest Problem D refraction part of the process, then there is a good program, this program using matlab implementation.