首页 | 本学科首页   官方微博 | 高级检索  
     

采用区域编码的椭圆对直线裁剪算法
引用本文:陈超,张兆印. 采用区域编码的椭圆对直线裁剪算法[J]. 中国图象图形学报, 2011, 16(1): 124-128
作者姓名:陈超  张兆印
作者单位:黑龙江大学计算机科学技术学院,黑龙江大学计算机科学技术学院
摘    要:裁剪算法的核心问题是速度问题,而求裁剪窗口和裁剪对象的交点是影响裁剪速度的主要因素。特别是椭圆对线段的裁剪,由于椭圆的方程是二次的,求椭圆与线段的交点需要求解一元二次方程,涉及开方运算,非常浪费机器时间。为提高裁剪速度,设计出5位的区域编码,利用此技术能够迅速而准确地判断出椭圆和线段的位置关系。对于完全可见或显然完全不可见的线段立即做出保留或弃掉的决定,避免求交运算;对于能够明确断定与椭圆相交的线段,采用中点分割算法求椭圆和线段的近似交点,避免求解一元二次方程和开方运算;对于其他情形的线段通过求解一元二次方程来完成裁剪。基于前述思想设计出的椭圆对线段裁剪算法与现有的同类算法相比,算法实现简单,裁剪速度具有较大提高。

关 键 词:线段裁剪   椭圆形窗口   区域编码   中点分割算法
收稿时间:2009-06-10
修稿时间:2010-08-31

Line clipping algorithm with respect to elliptical window based on region encoding
Chen Chao and Zhang Zhaoyin. Line clipping algorithm with respect to elliptical window based on region encoding[J]. Journal of Image and Graphics, 2011, 16(1): 124-128
Authors:Chen Chao and Zhang Zhaoyin
Affiliation:Chen Chao,Zhang Zhaoyin(School of Computer Science and Technology,Heilongjiang University,Harbin 150080 China)
Abstract:The key in clipping algorithm is the efficiency which is mainly influenced by computing the intersection points between the clipping window and the clipped object. Particularly, for line clipping with respect to elliptical window, to compute the intersection points between the ellipse and the line the quadratic equation has to be solved which involves the extraction of square root that is considered inefficient. To address this, we develop a technique of 5-bit region encoding by which the relationship between an ellipse and a line segment can be determined quickly and accurately. The line segments that are completely visible or completely invisible are discarded; the line segments that surely intersect with the ellipse are dealt with by middle-point segmentation algorithm to obtain the approximate intersection points; and the remaining line segments are clipped by solving the quadratic equations. The proposed algorithm is much more efficient than traditional algorithms, and is straightforward.
Keywords:line clipping   ellipse window   region encoding   middle point
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《中国图象图形学报》浏览原始摘要信息
点击此处可从《中国图象图形学报》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号