Abstract

Line clipping process often involves a lot of intersection calculations. One way for improving the efficiency of a line clipping algorithm is to save the unnecessary intersection calculations demanded by traditional algorithms either for rejecting some totally invisible lines or for clipping some partially visible lines. An adaptive clipping algorithm is presented here to achieve this goal. The clipping process of our new algorithm consists of three steps. Firstly, we adopt Encoding & Code checking technique of Cohen–Sutherland algorithm to accept the totally visible lines and reject the portion of invisible lines that lie completely on the outside of each boundary of the clip window. Secondly, we construct a diamond enclosing box of the original window called S-Window to reject another portion of invisible lines that cross the corner of the clip window. All the remaining lines are identified at the third step. For each line, we construct a virtual enclosing box of the original window, called V-Window, which aligns with the line’s direction. All of invisible lines that fail to be rejected during the previous two steps are now easily picked up without any intersection calculations. The remaining partially visible lines are clipped against the boundary edges of the window that they do intersect. Theoretical analysis and experimental statistics demonstrate the high efficiency of our new algorithm.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.