计算机技术与发展2017,Vol.27Issue(6):32-35,4.DOI:10.3969/j.issn.1673-629X.2017.06.007
Cohen-Sutherland直线剪裁算法改进
Modification of Cohen-Sutherland Line Clipping Algorithm
摘要
Abstract
Line segment clipping is one of the most basic problems to be solved in computer graphics,and the clipping speed directly affects the clipping efficiency of the whole graph.Cohen-Sutherland line segment clipping algorithm has lower efficiency because line segment classification is not complete and the intersection points are still calculated between straight line and the window extension edge.A modified Cohen-Sutherland line clipping algorithm based on linear angle calculation has been proposed.It is the idea that the line classification conditions can be improved using sign relations of four windows vertex and line,then if an auxiliary line from the end of the line to be cut to the nearest vertex of the window is made,the angle between an auxiliary line and a line to be cut can be calculated,and the intersecting window edge is determined according to the sign of angle.This method reduces the number of intersection.The modified algorithm not only simple and intuitive,easy to implement and of high efficiency,but also valuable for theory research and application of clipping technology.关键词
Cohen-Sutherland/直线裁剪算法/辅助线/夹角计算Key words
Cohen-Sutherland/line segment clipping algorithm/auxiliary line/angle calculation分类
信息技术与安全科学引用本文复制引用
李竹林..Cohen-Sutherland直线剪裁算法改进[J].计算机技术与发展,2017,27(6):32-35,4.基金项目
国家自然科学基金资助项目(11471007) (11471007)
延安市重大科技攻关项目(2014CGZH-13) (2014CGZH-13)
国家大学生创新训练项目(1498) (1498)