arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.27701cs.GR
收藏

利用四边形凹凸性的线段裁剪

Line Segment Clipping using Quadrilateral Concavity and Convexity

Vellore Institute of Technology(维洛尔理工学院)

Bimal Kumar Ray

AI总结:

本文提出了一种基于四边形凹凸性判断线段与轴对齐矩形窗口裁剪的算法,通过避免计算虚假交点提高效率。

摘要:

本文提出了一种用于将线段裁剪到轴对齐矩形窗口的算法。传统线段裁剪算法将裁剪边界和线段视为直线,而本文算法将两者视为线段,并通过构造由裁剪边界端点和线段端点构成的四边形来判断交点。四边形的凹凸性决定了线段是否与裁剪边界相交。若四边形为凹,则线段被拒绝;否则计算线段与裁剪边界的交点。由于采用'测试与相交'而非'相交与测试'的方法,该算法避免了计算虚假交点,从而减少获得裁剪线段所需分割次数。仅需一个过程即可处理任意位置的线段。通过使用基于执行时间的指标对随机线段进行实验,发现该算法在性能上优于Nicholl-Lee-Nicholl、Liang-Barsky、Cohen-Sutherland和Skala的算法。

英文摘要:

This paper proposes an algorithm for clipping line segment against an axis-aligned rectangular window. The conventional algorithms for line segment clipping treat the clipping boundary and/or the line segment to be clipped as line. The present algorithm treats the clipping boundary and the line segment to be clipped as line segment and using this strategy, it succeeds to avoid computation of false intersection points. A quadrilateral is constructed using the end points of a clipping boundary segment and the end points of the line segment to be clipped as its vertices. The concavity and convexity of the quadrilateral dictates whether a line segment actually intersects the clipping boundary. If the quadrilateral is found to be concave then the line segment is rejected, otherwise the point of intersection of the line segment with the clipping boundary is computed. Since a 'test & intersect' approach is used instead of a 'intersect & test', hence the proposed algorithm does not compute false intersection point thereby reducing the number of divisions required to obtain a clipped line segment. Only one routine can process line segments at any position. Improved performance is observed with respect to the Nicholl-Lee-Nicholl, Liang-Barsky, Cohen-Sutherland and Skala's algorithm through experiments with random line segments using a metric based on execution time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑