P2Seg: Distance query from point to segments

IF 3.1 3区 计算机科学 Q2 COMPUTER SCIENCE, SOFTWARE ENGINEERING
Jiantao Song , Rui Xu , Wensong Wang , Shiqing Xin , Shuangmin Chen , Jiaye Wang , Taku Komura , Wenping Wang , Changhe Tu
{"title":"P2Seg: Distance query from point to segments","authors":"Jiantao Song ,&nbsp;Rui Xu ,&nbsp;Wensong Wang ,&nbsp;Shiqing Xin ,&nbsp;Shuangmin Chen ,&nbsp;Jiaye Wang ,&nbsp;Taku Komura ,&nbsp;Wenping Wang ,&nbsp;Changhe Tu","doi":"10.1016/j.cad.2025.103947","DOIUrl":null,"url":null,"abstract":"<div><div>Querying the nearest distance from a point to <span><math><mi>n</mi></math></span> line segments in 2D is a textbook problem in computational geometry. This paper presents P2Seg, a novel algorithmic strategy that transforms the intricate problem into an accessible linear traversal. Our method precomputes a KD tree and a Voronoi diagram for the site collection <span><math><mi>S</mi></math></span>, where <span><math><mi>S</mi></math></span> refers to the endpoints of all line segments. Obviously, for a query point <span><math><mi>q</mi></math></span>, the nearest site <span><math><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub></math></span> provides a crucial clue for pinpointing the nearest line segment, i.e., the pairing <span><math><mrow><mo>(</mo><mi>q</mi><mo>,</mo><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow></math></span> effectively reduces the search from <span><math><mi>n</mi></math></span> line segments to a limited number, represented as <span><math><mrow><mi>L</mi><mrow><mo>(</mo><mi>q</mi><mo>,</mo><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow></mrow></math></span>. The key idea of this paper is driven by an insightful observation: if the ray <span><math><mrow><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub><mi>q</mi></mrow></math></span> intersects with <span><math><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub></math></span>’s Voronoi cell at a point, say <span><math><msup><mrow><mi>q</mi></mrow><mrow><mo>′</mo></mrow></msup></math></span>, then <span><math><mrow><mi>L</mi><mrow><mo>(</mo><mi>q</mi><mo>,</mo><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow></mrow></math></span> is a subset of <span><math><mrow><mi>L</mi><mrow><mo>(</mo><msup><mrow><mi>q</mi></mrow><mrow><mo>′</mo></mrow></msup><mo>,</mo><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow></mrow></math></span>. This suggests that preprocessing efforts can be substantially minimized by focusing solely on scenarios where the query point lies on the Voronoi edges, which are fundamentally one-dimensional. We further prove that the challenge of locating the nearest line segment from <span><math><mrow><mi>L</mi><mrow><mo>(</mo><msup><mrow><mi>q</mi></mrow><mrow><mo>′</mo></mrow></msup><mo>,</mo><msub><mrow><mi>s</mi></mrow><mrow><mi>i</mi></mrow></msub><mo>)</mo></mrow></mrow></math></span> can be distilled down to a simple linear traversal. Testing on datasets of varying complexities shows that P2Seg significantly outperforms state-of-the-art techniques. For example, in scenarios involving 10K segments with an average length of 0.5, our method runs 2.2 times faster than P2M and 60 times faster than AABB, as illustrated in the teaser figure.</div></div>","PeriodicalId":50632,"journal":{"name":"Computer-Aided Design","volume":"189 ","pages":"Article 103947"},"PeriodicalIF":3.1000,"publicationDate":"2025-08-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer-Aided Design","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010448525001083","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

Querying the nearest distance from a point to n line segments in 2D is a textbook problem in computational geometry. This paper presents P2Seg, a novel algorithmic strategy that transforms the intricate problem into an accessible linear traversal. Our method precomputes a KD tree and a Voronoi diagram for the site collection S, where S refers to the endpoints of all line segments. Obviously, for a query point q, the nearest site si provides a crucial clue for pinpointing the nearest line segment, i.e., the pairing (q,si) effectively reduces the search from n line segments to a limited number, represented as L(q,si). The key idea of this paper is driven by an insightful observation: if the ray siq intersects with si’s Voronoi cell at a point, say q, then L(q,si) is a subset of L(q,si). This suggests that preprocessing efforts can be substantially minimized by focusing solely on scenarios where the query point lies on the Voronoi edges, which are fundamentally one-dimensional. We further prove that the challenge of locating the nearest line segment from L(q,si) can be distilled down to a simple linear traversal. Testing on datasets of varying complexities shows that P2Seg significantly outperforms state-of-the-art techniques. For example, in scenarios involving 10K segments with an average length of 0.5, our method runs 2.2 times faster than P2M and 60 times faster than AABB, as illustrated in the teaser figure.

Abstract Image

P2Seg:从点到段的距离查询
查询2D中点到n个线段的最近距离是计算几何中的教科书问题。本文提出了一种新的算法策略P2Seg,它将复杂的问题转化为可访问的线性遍历。我们的方法为站点集合S预先计算了KD树和Voronoi图,其中S指所有线段的端点。显然,对于查询点q,最近的站点si为精确定位最近的线段提供了关键线索,即配对(q,si)有效地将搜索从n个线段减少到有限的数量,表示为L(q,si)。本文的关键思想是由一个深刻的观察驱动的:如果射线siq与si的Voronoi单元相交于一点,比如q ‘,那么L(q,si)是L(q ’,si)的子集。这表明,如果只关注查询点位于Voronoi边(基本上是一维的)的场景,预处理工作可以大大减少。我们进一步证明了从L(q ',si)找到最近的线段的挑战可以归结为一个简单的线性遍历。在不同复杂性的数据集上的测试表明,P2Seg明显优于最先进的技术。例如,在涉及平均长度为0.5的10K段的场景中,我们的方法比P2M快2.2倍,比AABB快60倍,如图所示。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Computer-Aided Design
Computer-Aided Design 工程技术-计算机:软件工程
CiteScore
5.50
自引率
4.70%
发文量
117
审稿时长
4.2 months
期刊介绍: Computer-Aided Design is a leading international journal that provides academia and industry with key papers on research and developments in the application of computers to design. Computer-Aided Design invites papers reporting new research, as well as novel or particularly significant applications, within a wide range of topics, spanning all stages of design process from concept creation to manufacture and beyond.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信