Open Access
Algorithms for 2D Line Clipping
EurographicsSkala, Vaclav1989Reports
The below shown convex polygon clipping algorithm is based on the principle of Liang-Barsky's algorithm and is simpler than the Cyrus-Beck's algorithm and does not need an anticlockwise orientation of the polygon edges as Liang-Barsky s algorithm does. Provided a convex polygon is given by its vertices in the clockwise or in the anticlockwise order arbitralily and no pair of edges lies on the same line ( it is not a principle restriction ). Let us consider some situations that might occur if a line segment with end points and ought to be clipped, see fig.2.2. All intersections of the line w(q) with edges of the convex polygon are obtained by solving the following linear equations:

The content you want is available to Zendy users.

Already have an account? Sign in
Having issues? Contact support