The algorithm begins with an input list of all vertices in the subject polygon.
The Weiler–Atherton algorithm overcomes this by returning a set of divided polygons, but is more complex and computationally more expensive, so Sutherland–Hodgman is used for many rendering applications.
The vertices of the clipped polygon are to be found in outputList when the algorithm terminates.
If the vertices of the clip polygon are consistently listed in a counter-clockwise direction, then this is equivalent to testing whether the point lies to the left of the line (left means inside, while right means outside), and can be implemented simply by using a cross product.
ComputeIntersection is a function, omitted here for clarity, which returns the intersection of a line segment and an infinite edge.