Joris's generic 2D sweeper