Learning c++ with simulation of objects moving in Newtonian gravity