A 2D gravity simulator