高级检索

基于多重编码技术的圆形窗口线裁剪算法

New Clipping Algorithm of Line Against Circular Window with Multi-encoding Approach

  • 摘要: 文中算法建立在全面分析线段与圆形窗口几何特性及二者相对位置的基础上.首先引入常规外切正方形一次编码技术,然后提出旋转45°外切正方形二次编码和广义距离三次编码两种新的编码技术.常规外切正方形一次编码和旋转外切正方形二次编码可以快速地舍弃大部分完全位于圆形窗口外的线段,广义距离三次编码可以快速地获取完全位于圆形窗口内的线段、快速地判别线段与圆形窗口的相对位置.在获取线圆相对位置的基础上,通过广义距离既可舍弃剩余的窗外线段,又能加快线段与圆形窗口的求交进程.实验结果表明,该算法具有较高的运算效率和稳定性.

     

    Abstract: Based on the thorough analysis of relative positions of a line segment with circle, a new clipping algorithm for circular window is established. By introducing the common circumscribed-square encoding first, two new encoding methods are designed, i.e., the secondary 45° rotated-square encoding and the tertiary generalized-distance encoding. The common encoding joining with the secondary encoding can rapidly identify most of the line segments that are completely outside the window. The tertiary encoding can quickly identify all the line segments that are completely inside the window as well as quickly determine the relative positions between them. The generalized distance can also be used to quickly discarding the remaining lines that are outside the window and quickly calculating the intersections between line segment and circle. Experiment results show that the new algorithm has a high efficiency and a good stability.

     

/

返回文章
返回