节点文献
基于矩形包围盒的多边形碰撞检测算法
A Polygon Collision Detection Algorithm Based on Rectangular Bounding Volume
【摘要】 碰撞检测是计算机图形学领域中的一个普遍存在的问题。为了提高多边形碰撞检测的效率 ,针对简单形式刚性运动的多边形对象 ,提出了一种基于二维轴向矩形包围盒结构的平面简单多边形碰撞检测算法。该算法基于坐标轴的单调性对多边形进行分割 ,并通过矩形包围盒之间的预检来减少无关边对的相交测试 ,以加速算法的终止。由于采用轴向扫描线方法可以大大减少包围盒测试的数量和线段求交的数量 ,所以 ,经过少量的“边 -边”相交判断就能求解到所有交点 ,同时能快速地获得两多边形干涉发生的第 1位置。试验表明 :(1)对于一般多边形 ,该算法的复杂度也远远低于 O(NP× NQ) ;(2 )对于凸多边形对象 ,该算法的复杂度为 O(NP+NQ) ,其中 NP,NQ 为多边形 P,Q的顶点数。由此可见 ,算法能够获得较好的运算效率
【Abstract】 Collision detection is a prevalent problem in computer graphics. A fast, accurate and feasible collision detection algorithm is important for an application. In this paper, a new planar simple polygon intersection algorithm, based on 2D axis-aligned bounding rectangle data structure, is presented for the polygons subjected to simple and unreformed movement. A new partition strategy for geometrical graphics according to the axial monotony, and the pre-checking process between 2D axis-aligned bounding rectangles reduce the number of unnecessary edge-pairs to be checked efficiently,so the algorithm can terminate promptly. After the partition along with coordinate axis, the interference checking between monotone chains proceeds. A novel search method based on sweep-line theory is adopted to eliminate the number of collision test for both segment-pairs and bounding volume-pairs drastically. So it can prompt the execution of algorithm. The accurate intersections, as well as the first occurrence of intersection between two objects subjected to a dynamic environment, are acquired by less arithmetical operation. The experimental results indicate that the complexity is far less than -O(N P×N Q)-for generic polygons,even asymptotically -O(N P+N Q)- for two convex polygons, wherein -N P,N Q- denote the vertex number of two polygons -P,Q- respectively. So, it is a fast and efficient algorithm.
【Key words】 simple polygons; bounding volume; pre-check; collision detection;
- 【文献出处】 中国图象图形学报 ,Journal of Image and Graphics , 编辑部邮箱 ,2004年11期
- 【分类号】TP391.41;TP391.
- 【被引频次】50
- 【下载频次】715