MATLAB source code here: https://github.com/mws262/MAE5730_exa....
The three body problem involves three pointmasses attracted to each other by gravity. Most simulations will produce chaotic results. Though, if you start with just the right initial conditions, the pattern will repeat infinitely (periodic). This video is of some of the periodic solutions I found numerically. I didn't test these very robustly, so 1 or 2 could be a little off.