This paper presents a new algorithm for line clipping against a polygonal window by exploiting the local relationship between each line segment and the polygon. Firstly, a minimal enclosing box (MEB) of the polygon ...This paper presents a new algorithm for line clipping against a polygonal window by exploiting the local relationship between each line segment and the polygon. Firstly, a minimal enclosing box (MEB) of the polygon is adopted to reject the invisible line segments located outside the MEB. Secondly, a 45° rotated box is used to encode the endpoint of the line segment, and then reject a portion of the invisible segments crossing polygon comers. Finally, instead of encoding the endpoints of all line segments with respect to the polygonal window, each vertex of the polygon is encoded, taking the line segment to be clipped as reference. For efficient encoding of the polygon vertices, a new concept, termed with slope adaptive virtual box, is introduced regarding each line segment. Such a box can not only conveniently reject all totally invisible lines lying outside the MEB conveniently, but also precisely identify the edges of the polygon with which the line segment potentially intersects. With the summation of the vertex codes, it can be verified whether the line segment is separated from or potentially intersects the polygon window. Based on the product of the codes of adjacent vertices, singular cases of intersection can be solved accurately. Experimental results demonstrate the efficiency and stability of the new algorithm.展开更多
Polygon clipping is of great importance in computer graphics.One of the popular algorithms to clip a polygon is Cohan–Sutherland Hodgeman algorithm which is based on line clipping.Cohan–Sutherland Hodgeman algorithm...Polygon clipping is of great importance in computer graphics.One of the popular algorithms to clip a polygon is Cohan–Sutherland Hodgeman algorithm which is based on line clipping.Cohan–Sutherland Hodgeman algorithm clips the polygon against the given rectangular clip window with the help of line clipping method.Cohan–Sutherland algorithm requires traversing the polygon in anti clockwise direction(positive orientation).In this work we propose an efficient polygon clipping algorithm against a rectangular clip window.Proposed algorithm uses parametric representation of polygon edges.Using the concept of point clipping,we can find required intersection points of edges of polygon with clip window boundaries.Well suited numerical illustrations are used to explain the proposed polygon clipping method.The proposed algorithm is computationally less expensive and comprehensive.展开更多
基金Project supported by the National Natural Science Foundation of China(No. 60021201), and the Research Fund for the Doctoral Program of Higher Education (No. 2002335093), China
文摘This paper presents a new algorithm for line clipping against a polygonal window by exploiting the local relationship between each line segment and the polygon. Firstly, a minimal enclosing box (MEB) of the polygon is adopted to reject the invisible line segments located outside the MEB. Secondly, a 45° rotated box is used to encode the endpoint of the line segment, and then reject a portion of the invisible segments crossing polygon comers. Finally, instead of encoding the endpoints of all line segments with respect to the polygonal window, each vertex of the polygon is encoded, taking the line segment to be clipped as reference. For efficient encoding of the polygon vertices, a new concept, termed with slope adaptive virtual box, is introduced regarding each line segment. Such a box can not only conveniently reject all totally invisible lines lying outside the MEB conveniently, but also precisely identify the edges of the polygon with which the line segment potentially intersects. With the summation of the vertex codes, it can be verified whether the line segment is separated from or potentially intersects the polygon window. Based on the product of the codes of adjacent vertices, singular cases of intersection can be solved accurately. Experimental results demonstrate the efficiency and stability of the new algorithm.
文摘Polygon clipping is of great importance in computer graphics.One of the popular algorithms to clip a polygon is Cohan–Sutherland Hodgeman algorithm which is based on line clipping.Cohan–Sutherland Hodgeman algorithm clips the polygon against the given rectangular clip window with the help of line clipping method.Cohan–Sutherland algorithm requires traversing the polygon in anti clockwise direction(positive orientation).In this work we propose an efficient polygon clipping algorithm against a rectangular clip window.Proposed algorithm uses parametric representation of polygon edges.Using the concept of point clipping,we can find required intersection points of edges of polygon with clip window boundaries.Well suited numerical illustrations are used to explain the proposed polygon clipping method.The proposed algorithm is computationally less expensive and comprehensive.