高级检索
张航城, 刘懿, 代凯, 宋天琦, 王乐, 曾薇, 杨义军. 在局部坐标系下的平面线段距离求解算法[J]. 计算机辅助设计与图形学学报, 2023, 35(12): 1966-1976. DOI: 10.3724/SP.J.1089.2023.2023-00028
引用本文: 张航城, 刘懿, 代凯, 宋天琦, 王乐, 曾薇, 杨义军. 在局部坐标系下的平面线段距离求解算法[J]. 计算机辅助设计与图形学学报, 2023, 35(12): 1966-1976. DOI: 10.3724/SP.J.1089.2023.2023-00028
Zhang Hangcheng, Liu Yi, Dai Kai, Song Tianqi, Wang Le, Zeng Wei, Yang Yijun. Algorithm for Solving the Distance of Planar Line Segments Based on Local Coordinate System[J]. Journal of Computer-Aided Design & Computer Graphics, 2023, 35(12): 1966-1976. DOI: 10.3724/SP.J.1089.2023.2023-00028
Citation: Zhang Hangcheng, Liu Yi, Dai Kai, Song Tianqi, Wang Le, Zeng Wei, Yang Yijun. Algorithm for Solving the Distance of Planar Line Segments Based on Local Coordinate System[J]. Journal of Computer-Aided Design & Computer Graphics, 2023, 35(12): 1966-1976. DOI: 10.3724/SP.J.1089.2023.2023-00028

在局部坐标系下的平面线段距离求解算法

Algorithm for Solving the Distance of Planar Line Segments Based on Local Coordinate System

  • 摘要: 针对现有CAD几何引擎和VLSI设计中缺乏高速、高精度平面线段距离求解算法的问题,提出一种基于局部坐标系的平面线段距离求解算法.首先通过坐标变换构建局部坐标系;然后根据2条线段的相对位置关系将平面线段距离求解归纳分类成12种可以直接进行最近点求解情形;最后通过求解最近点距离进而实现求解平面线段距离.采用集成电路线段数据和随机生成线段数据进行实验,实验结果显示,与对比算法相比,文中算法效率提高23%~35%;在4种临界情形下,仍能控制其计算误差,证明了其有效性.

     

    Abstract: Aiming at the lack of high-speed and high-precision planar line segment distance solving algorithms in the existing CAD geometry engine and VLSI design, we propose a planar line segment distance solving algorithm based on local coordinate system. First, a local coordinate system is established by coordinate transformation; then, according to the relative position relationship between two line segments, the planar line segment distance solving is classified into 12 kinds of nearest point solving cases; finally, the planar line segment distance is solved by computing the distance of the nearest points. The experiments are carried out with PCB line segments data and randomly generated line segments data, and the experiment results show that the algorithm is 23% to 35% more efficient than the compared algorithms. Moreover, the algorithm can still control the computational error in four critical cases, which proves its effectiveness.

     

/

返回文章
返回