基于符号判断的C-S直线裁剪算法改进  被引量:1

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

在线阅读下载全文

作  者:李竹林[1] 张根耀[1] 郭万鑫 

机构地区:[1]延安大学计算机学院,陕西延安716000

出  处:《微电子学与计算机》2015年第8期150-153,共4页Microelectronics & Computer

基  金:国家自然科学基金项目(61379026);陕西省教育厅项目(2013JK1124);国家大学生创新训练项目

摘  要:C-S(Cohen-Sutherland)直线段裁剪算法因直线段分类的不完全和直线与窗口边界求交点次数多而降低算法效率.提出了一种改进C-S裁剪算法,基本思想是首先根据裁剪窗口的顶点与直线的关系对直线的分类条件进行改进,然后利用直线分类时运算的符号值判断直线与窗口边的相交情况.改进的算法能准确地判断出三类直线,同时,在不需要任何辅助操作与运算的情况下,使得求交点次数降为最多两次,大大提高算法的效率.算法思想简单,直线判断与裁剪过程容易,有利于编程实现,而且该算法可推广到任意凸多边形裁剪窗口.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.

关 键 词:C-S 直线段裁剪算法 分类 符号 求交次数 

分 类 号:TP301[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象