2D gravity simulator