Mostly Misaligned Mirrors

Recently my stochastic professor introduced me to a problem he has been pondering for over two decades: on the two-dimensional integer lattice \mathbb{Z}^2 one shall flip a three-sided coin for each point and uniformly place one of three mirrors, \{\diagup,\,\cdot\,,\diagdown\}, where \,\cdot\, denotes not placing a mirror. After having populated the world, one picks their favorite integer tuple and points a beam of light in one of the four cardinal directions. With what probability does the light fall into a loop, never fully escaping?

Simulating a beam of light bouncing off mirrors.
A cycle which includes the origin.

Continue reading


This program uses two positions and a color to create beautiful images.


  • ‘q’ saves the current image
  • Space pauses and resumes the image’s creation

Different colors Only using red Only using red and blue

# Python 2.7.7 Code
# Pygame 1.9.1 (for Python 2.7.7)
# Jonathan Frech 21st of September, 2015
#         edited 23rd of September, 2015
#         edited 24th of September, 2015

Continue reading