GIS开窗裁减(Cohen-Sutherland线段裁减的改进算法)

本文介绍了GIS领域中对Cohen-Sutherland线段裁减算法的改进,探讨了如何更有效地进行图形开窗裁减操作,涉及线段与窗口边界交点的判断及裁减过程。
摘要由CSDN通过智能技术生成

                                                   Cohen-Sutherland线段裁减的改进算法

                                                                      陈玉进 李泉

                             南京跬步科技有限公司 http://www.creable.cn

摘要:CohenSutherland线段裁减算法,对于线段全部落入视口内、或线段位于视口外一侧的情况判断较容易,而除此之外的情况判断裁减较复杂,需要线段与视口边线作多次求交裁减,减少求交裁减的次数是提高算法效率的关键。本文提出一种新的改进算法,先对编码进行“逻辑与”操作排除掉线段位于视口外一侧的情况,再对编码进行“逻辑或”操作,并对其结果分类讨论,以确定不同的相交情形,有效地减少了线段求交裁减次数,提高了算法的效率。

关键词:CohenSutherland线段裁减算法,逻辑与,逻辑或

中图分类号:TP391

Improvement to CohenSutherland Line Clipping Algorithm

AbstractCohenSutherland Line Clipping Algorithm can easily deal with the case that the line is completely inside of the view, or off to the side of the view, and other cases are complexly dealt with operations between line and view several times .The key of improving the algorithm is reducing the times of the Intersecting and Clipping operations. The paper proposed a new improved algorithm. Firstly, the logical AND operation of the codes eliminates the case that the line is completely inside of the view. Then, the logical OR operation of the codes determines the location relationship between line and view. This way could reduce algorithm complexity effectively.

Key wordsCohenSutherland Line Clipping Algorithmlogical ANDlogical OR

线段裁减算法,是保留视口范围内的图形部分,裁减掉超出视口范围的图形,很多复杂图形的裁减也都可以归为线段裁减,因此,线段裁减是图形显示的重要环节,算法的效率直接影响图形显示的效果。在计算机图形学中,比较常用的算法有:CohenSutherland编码裁减算法、梁友栋-Barsky算法等。本文对CohenSutherland编码裁减算法提出了一些改进的思路。

1.        CohenSutherland算法概述

1.1   Cohen

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值