Python 2.7 implementation and example of the algorithm described here: http://roguebasin.roguelikedevelopment.org/index.php?title=Restrictive_Precise_Angle_Shadowcasting