Clipping 2D polygons is one of the basic routines in computer graphics
. In rendering complex 3D images it has to be done several thousand ti
mes. Efficient algorithms are therefore very important. We present suc
h an efficient algorithm for clipping arbitrary ED-polygons. The algor
ithm can handle arbitrary closed polygons, specifically where the clip
and subject polygons may self-intersect. The algorithm is simple and
faster than Vatti's [1992] algorithm, which was designed for the gener
al case as well. Simple modifications allow determination of union and
set-theoretic differences of two arbitrary polygons.