错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

A new fully projective O(lg N) line convex polygon intersection algorithm

  • Vaclav Skala

摘要

Intersecting algorithms, especially line clipping in \({E^{2}}\) E 2 and \({E^{3}}\) E 3 in computer graphics, have been studied for a long time. Many different algorithms have been developed. The simplest case is a line clipping by a convex polygon in \({E^{2}}\) E 2 with O(N) computational complexity and with known polygon edges orientation. This contribution presents a new algorithm for a line clipping by a convex polygon in E \(^{2}\) 2 with O(lg N) complexity, which is based on the point-in-half plane test. The proposed algorithm does not require prior knowledge of the polygon edge orientation. The vertices of the convex polygon and the clipped line can be given in projective space using homogeneous coordinates. The algorithm uses vector–vector operations for efficient implementation with SSE or AVX vector–vector instructions or on GPUs. It is simple and robust.