LI Zhu-lin, ZHANG Gen-yao, GUO Wan-xin. A Modified C-S Line Segment Clipping Algorithm Based on Sign Judgment[J]. Microelectronics & Computer, 2015, 32(8): 150-153. DOI: 10.19304/j.cnki.issn1000-7180.2015.08.032
Citation: LI Zhu-lin, ZHANG Gen-yao, GUO Wan-xin. A Modified C-S Line Segment Clipping Algorithm Based on Sign Judgment[J]. Microelectronics & Computer, 2015, 32(8): 150-153. DOI: 10.19304/j.cnki.issn1000-7180.2015.08.032

A Modified C-S Line Segment Clipping Algorithm Based on Sign Judgment

  • C-S(Cohen-Sutherland) segment clipping algorithm is lower efficiency because line segment classification is not completely and there are four intersection operations of line segment and window edge lines. In this paper, a modified C-S line-clipping algorithm based on sign judgment is proposed. The basic idea is that the line classification conditions was improved by sign relations of four windows vertex and line firstly, then the fact intersection of line and window edges was judged using the sign once again. The modified algorithm with out only judge three line types exactly and completely, but also reduce intersection to two numbers not any auxiliary operation and calculation. The modified algorithm is simple and efficiency, line judgment, clipping process and programming is easy, and the algorithm can be extended to arbitrary convex polygon clipping window.
  • loading

Catalog

    Turn off MathJax
    Article Contents

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return