Cartoon of phase conditions for Bragg’s law 

This animation creates a cartoon of Bragg’s law . Note that in addition to the main matlab code, there is the function mArrow3.m used to generate fancy 3D arrows, which I downloaded from MathWorks File Exchange, and for which I credit Georg Stillfried. I use this function in several of the matlab codes available here.