  Light has a fascinating property: it always travels the path that takes the
least time between any two points. This is the motivating property behind
optical phenomena such as Reflection and Refraction. The unreasonable economic
efficiency of light is captured by a single proposition: the Principle of Least
Action (PLA) in Optics. The PLA can be difficult for students to comprehend
because unlike reflection and refraction, which emerge from optimizing a
one-dimensional function, the PLA emerges from optimizing an
infinite-dimensional functional. Furthermore, students may be confused by the
formulation of the Lagrangian, or the counterintuitive paths generated by the
PLA. To address these difficulties, this paper presents three simulations which
demonstrate the PLA in Optics. Simulations have proven to be effective
pedagogical tools in making mathematical abstractions such as the Action
accessible to undergraduate students. The three simulations in this paper are
as follows: light reflecting in equal angles, light refracting through
different mediums, and light traveling the path of least time in an arbitrary
refractive profile. We then consider the famous Brachistochrone problem as a
special case of the third simulation. The interactive simulations discussed in
the paper, along with supplemental discussion questions, video tutorials, and
fully commented code, are available here.
