Sutherland–Hodgman algorithm: Difference between revisions

Content deleted Content added
The pseudocode was wrong
Line 14:
Given a list of edges in a clip polygon, and a list of vertices in a subject polygon, the following procedure clips the subject polygon against the clip polygon.
 
List outputList = subjectPolygon;
List inputList = outputList;
outputList.clear();
for (Edge clipEdge in clipPolygon) do
List inputList = outputList;
outputList.clear();
Point S = inputList.last;
for (Point E in inputList) do