Similar Items: A greedy maximal sweepline algorithm for a Jordan curve