The Research of Collision Detection Algorithm Based on Separating axis Theorem

Similar documents
4th Annual International Conference on Material Science and Engineering (ICMSE 2016)

A method of three-dimensional subdivision of arbitrary polyhedron by. using pyramids

Efficient Path Finding Method Based Evaluation Function in Large Scene Online Games and Its Application

result, it is very important to design a simulation system for dynamic laser scanning

Hole repair algorithm in hybrid sensor networks

Study on GA-based matching method of railway vehicle wheels

2008 International Conference on Apperceiving Computing and Intelligence Analysis (ICACIA 2008) Chengdu, China December 2008

Organization and Retrieval Method of Multimodal Point of Interest Data Based on Geo-ontology

The Design of Electronic Color Screen Based on Proteus Visual Designer Ting-Yu HOU 1,a, Hao LIU 2,b,*

Qiqihar University, China *Corresponding author. Keywords: Highway tunnel, Variant monitoring, Circle fit, Digital speckle.

An Improved KNN Classification Algorithm based on Sampling

Application Research of Wavelet Fusion Algorithm in Electrical Capacitance Tomography

The Research of Delay Characteristics in CAN Bus Networked Control System

Journal of Chemical and Pharmaceutical Research, 2015, 7(3): Research Article

Research on Software Scheduling Technology Based on Multi-Buffered Parallel Encryption

View-dependent fast real-time generating algorithm for large-scale terrain

Research Article. Three-dimensional modeling of simulation scene in campus navigation system

Utilizing Restricted Direction Strategy and Binary Heap Technology to Optimize Dijkstra Algorithm in WebGIS

Modeling and Analysis of the Support System of Space-based Anti-missile Information Based on UML

Critique for CS 448B: Topics in Modeling The Voronoi-clip Collision Detection Algorithm

Qingdao, , China. China. Keywords: Deep sea Ultrahigh pressure, Water sound acquisition, LabVIEW, NI PXle hardware.

Collision Detection II. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

5th International Conference on Information Engineering for Mechanics and Materials (ICIMM 2015)

The Study of Intelligent Scheduling Algorithm in the Vehicle ECU based on CAN Bus

Collision Detection CS434. Daniel G. Aliaga Department of Computer Science Purdue University

Improvement of SURF Feature Image Registration Algorithm Based on Cluster Analysis

Algorithm research of 3D point cloud registration based on iterative closest point 1

Half-edge Collapse Simplification Algorithm Based on Angle Feature

Collision Detection with Bounding Volume Hierarchies

2009 International Conference on Wavelet Analysis and Pattern Recognition (ICWAPR 2009) Baoding, China July IEEE Catalog Number: ISBN:

A Novel Method of Optimizing Website Structure

A QR code identification technology in package auto-sorting system

Improved DDA Algorithm and FPGA Implementation Yi-Xuan WANG a, Quan-Gang WEN b, He YIN c, Zhi-Gang HAO, Xin-Zheng DONG

A New Evaluation Method of Node Importance in Directed Weighted Complex Networks

Tracking Minimum Distances between Curved Objects with Parametric Surfaces in Real Time

Distance and Collision Detection

ON THE EMPTY CONVEX PARTITION OF A FINITE SET IN THE PLANE**

Camera Pose Measurement from 2D-3D Correspondences of Three Z Shaped Lines

Cmm-based Profile Measuring Method for Unknown Screw Compressor Rotor

Intuitionistic Fuzzy Petri Nets for Knowledge Representation and Reasoning

Study on Improving the Quality of Reconstructed NURBS Surfaces

Design on a method for interactive editing fault polygon

A DATA DRIVEN METHOD FOR FLAT ROOF BUILDING RECONSTRUCTION FROM LiDAR POINT CLOUDS

CHAPTER 2 REVIEW COORDINATE GEOMETRY MATH Warm-Up: See Solved Homework questions. 2.2 Cartesian coordinate system

Improvements and Implementation of Hierarchical Clustering based on Hadoop Jun Zhang1, a, Chunxiao Fan1, Yuexin Wu2,b, Ao Xiao1

An Improved DFSA Anti-collision Algorithm Based on the RFID-based Internet of Vehicles

Comprehensive analysis and evaluation of big data for main transformer equipment based on PCA and Apriority

Citation for the original published paper (version of record):

ZigBee Routing Algorithm Based on Energy Optimization

Simplified Voronoi diagrams for motion planning of quadratically-solvable Gough-Stewart platforms

Research on Evaluation Method of Video Stabilization

A Test Sequence Generation Method Based on Dependencies and Slices Jin-peng MO *, Jun-yi LI and Jian-wen HUANG

Development of 3D Positioning Scheme by Integration of Multiple Wiimote IR Cameras

An Optimization Algorithm of Selecting Initial Clustering Center in K means

Collision Detection. These slides are mainly from Ming Lin s course notes at UNC Chapel Hill

Research of 3D part reconstruction from Orthographic Projections Based on Solid Features

Course Number: Course Title: Geometry

Mobile Robot Path Planning: an Efficient Distance Computation between Obstacles using Discrete Boundary Model (DBM)

Mathematical Approaches for Collision Detection in Fundamental Game Objects

International Conference on Electromechanical Control Technology and Transportation (ICECTT 2015)

A Method of Identifying the P2P File Sharing

A Compatible Public Service Platform for Multi-Electronic Certification Authority

Shapes & Transformations and Angles & Measurements Spatial Visualization and Reflections a.) b.) c.) d.) a.) b.) c.)

Using Bounding Volume Hierarchies Efficient Collision Detection for Several Hundreds of Objects

Overview. Collision Detection. A Simple Collision Detection Algorithm. Collision Detection in a Dynamic Environment. Query Types.

1/25 Warm Up Find the value of the indicated measure

Collision detection. Piotr Fulma«ski. 1 grudnia

Towards New Heterogeneous Data Stream Clustering based on Density

Research on Multi-sensor Image Matching Algorithm Based on Improved Line Segments Feature

Open Access The Three-dimensional Coding Based on the Cone for XML Under Weaving Multi-documents

heptagon; not regular; hexagon; not regular; quadrilateral; convex concave regular; convex

Open Access Research on the Key Technology of Seismic Observation Equipment Cluster

Robot Motion Planning in Eight Directions

Research Of Data Model In Engineering Flight Simulation Platform Based On Meta-Data Liu Jinxin 1,a, Xu Hong 1,b, Shen Weiqun 2,c

Relational Database Watermarking for Ownership Protection

GPU Based Simulations of Collision Detection of Irregular Vessel Walls

Geometric Computations for Simulation

Collision Detection. Jane Li Assistant Professor Mechanical Engineering & Robotics Engineering

Stripe Noise Removal from Remote Sensing Images Based on Stationary Wavelet Transform

The Art Gallery Problem

Real time emergency route generating algorithm in tunnel

A Point in Non-Convex Polygon Location Problem Using the Polar Space Subdivision in E 2

Design of Liquid Level Control System Based on Simulink and PLC

Development of a Rapid Design System for Aerial Work Truck Subframe with UG Secondary Development Framework

Study on Delaunay Triangulation with the Islets Constraints

Collision detection. Piotr Fulma«ski. 19 pa¹dziernika Wydziaª Matematyki i Informatyki, Uniwersytet Šódzki, Polska

Open Access Research on the Arranging and Patchwork Design for Storage Tank Bottom Based on Sinovation

A Path Planning Method for Substation Laser Inspection Robot Based on Improved Ant Colony Algorithm

A Simplex based Dimension Independent Approach for Convex Decomposition of Nonconvex polytopes

Research on Heterogeneous Communication Network for Power Distribution Automation

Innovative Design of Furniture Modeling Based on Tree Structure Genetic Algorithm

Overview. Collision detection. Collision detection. Brute force collision detection. Brute force collision detection. Motivation

Computer Numerical Control System for Automatic Surface Machining. Chen Zuo Yue, Wang Xiao E, Yang Mei

EQUATIONS OF ALTITUDES, MEDIANS, and PERPENDICULAR BISECTORS

An algorithm of lips secondary positioning and feature extraction based on YCbCr color space SHEN Xian-geng 1, WU Wei 2

Mathematics High School Geometry An understanding of the attributes and relationships of geometric objects can be applied in diverse contexts

Literature Survey on Various Recommendation Techniques in Collaborative Filtering

Computational Geometry [csci 3250]

Virtual Interaction System Based on Optical Capture

Volumetric Particle Separating Planes for Collision Detection

Transcription:

The Research of Collision Detection lgorithm Based on Separating axis Theorem bstract Cheng Liang a, Xiaojian Liu School of Computer and Software Engineering, Xihua University, Chengdu, 610039, China a Lia_waking@126.com Separating axis theorem is used in a large number of game development, it is mainly used to detect whether two convex polygon product a collision. When the number of sides of a convex polygon is less, separating axis theorem can quickly determine whether it products a collision. However, When the number of edges is increased, the polygon will become more complex and the greater costs will be. improved algorithm is proposed for this shortcoming based on the closest point, where to find the parallel line of closest point as a potential separation axis, and then through potential separating axis to determine whether they product a collision. Keywords Separating axis theorem, convex polygon, closest point, collision detection. 1. Introduction With the continuous development of computer technology, virtual reality technology is constantly improving, and collision detection technology is undoubtedly the virtual reality technology to best embody the "reality". Collision detection is to determine whether they product a collision between two or more virtual world objects in order to perform a series of actions after the collision, such as being blocked by an obstacle, rewind and so on. Today, a large number of collision detection algorithm is used in computer games, augmented reality, we have higher requirements for the real-time and accurate of the collision detection algorithms, so that it can give players a better sense of reality [1]. Separating axis theorem [2] (Separating xis Theorem, Called the ST) The main content is when two objects to detect collision, if we can find out a axis to show the two objects do not intersect which projection on this axis. then, it will prove two objects do not intersect. article[3] proposed that by using the normal of a edge of convex polygon as a potential separation axis, but this method has a drawback what is with growth of edges of a convex polygon, the number of potential separation of the respective axis will also increase. articles [4-8] summed up that by the bounding box for testing in advance, if two bounding boxes have product collision, then we will use separating axis theorem to accurate determination. otherwise it can be determined that it does not collide. This method does not solve with growth of edges of a convex polygon the potential separating axis will increase. Instead,the use of the bounding box to increase the amount of computation. In this paper, Improved algorithm is based on the closest point [9,10],try to find this potential separating axis that it must be parallel to the line of closest point,so as to solve this question. 2. Related knowledge 2.1 Euclidean distance Euclidean distance (Euclidean distance) also referred to as the Euclid distance, it often used to define the Euclidean distance between the two-dimensional space. d( x, y) ( x i yi ) 2 i 0,1,2,3,..., n (1) 110

The closest points can be determined by the Euclidean distance in this article, the real distance between two convex polygons obtained by Euclidean distance. 2.2 Convex polygon and properties If all the edges of a polygon, there is an edge to the indefinite extension of the two parties to become a straight line, the other edges are in the same side of this line (or connection between any two points inside polygon), then the polygon is called convex polygon. The nature of convex polygon and Euclidean distance of points, we can draw the following one character. Nature: the closest points of two convex polygons contains at least one vertex in the all vertexes of two convex polygons. Center of gravity of convex polygon [11]: For center of gravity of a convex N-gon, it can be divided into a triangle and a convex (N-1)-gon or quadrilateral and convex (N-2)-gon, and then find out the center of gravity and connect into the line. s shown in Figure 1 Seeking the center of gravity a convex quadrilateral, which were taken diagonally into two triangles, respectively gain center of gravity and a line segment connecting the center of gravity as shown in Figure 1 (a), (b), the line segment B, CD the intersection and E is the center of gravity of the quadrilateral. Fig. 1 Center of gravity of convex polygon 2.3 Separating axis theorem Separating axis theorem by S. Gottschalk [2] suggested that the main content is for two or more objects will collide, if I could find a axis so that these objects do not overlap on the projection of the axis, then we can believe that these objects do not intersect each other. Select theoretically axis is not fixed, as long as there is such an axis. However, due to the separation axis theorem applies to convex polygons, so for non-convex polygon can be decomposed into several all convex polygons. shown in Figure 2. Fig. 2 Separating axis theorem For 2D, the normal of each edge of convex polygon include the possibility of the axis in all directions, so when we select potential separating axis (Potential Separating xis, PS), generally we can choose normal of edges of the convex polygon. then the normal vector can be so defined: y x x y 0 or y 0 y x (2) x For negative numbers, it just represents different directions of the two normal vectors, and it does not need to be considered when vertexes projected onto potential separating axis. Separating axis theorem collision detection algorithm is an optimistic collision detection algorithm, once you have found such a disjoint axis that detection will no longer be implemented, otherwise would have been implemented. nd when the convex polygon becomes more complex, the greater the corresponding overhead. So for these shortcomings, leading to the emergence of a large number 111

of calculations, there are many optimization schemes. The main idea is to reduce the number of potential separating axis, thereby reducing the amount of computation for collision detection. For example, two rectangles, because of its edges are parallel two by two, so we can merge potential separating axis into two separating axis, Under the best of circumstances the number of its maximum potential separating axis is two. The worst case is four. There is no need to test eight axes, We just need to detect two or four axes to determine whether the collision. Unfortunately, other irregularities can not use this method, only to detect potential separating axis one by one. There are other optimization programs, such as the object's bounding box beforehand rough test, then more precise BB bounding box test [12], after separating axis test, thereby reducing unnecessary calculations. Clearly these measures did not solve this question from within. 3. Improved algorithm 3.1 Closest points Closest points are two convex polygon the nearest two points, namely European nearest point. If are the closest points, you must satisfy the following condition: s 1, s 2 D( s1, s2) {( s1, s2) dis( s1, s2) dis( ai, bj ), ai P1 且 bj P2, i 0,1,2... n, j 0,1,2... N} (3) Which represents the Euclidean distance between two points. These two points can determine whether a collision between each other very accurately, this approach which is also the best. By the nature of a convex polygon can be found the nearest point or a group contains at least a vertex of convex polygon. If is one of the nearest points, then by the following formula, you can easily draw another point. Figure 3 shows a schematic diagram. s 1, s 2 represent points on the convex polygon P 1, P 2 point set, dis( a, b) Fig. 3 Closest points So n n, n ), ( x, y ), the point where the straight line : ( 1 2 x x y y (4)and edge CD form a set of equations to solve another point, the use of the Euclidean distance we can determine which is another closest point. However, we do not know which one the vertex of convex polygon is closest point from the beginning, but we can achieve by computer programming, this would need to traverse all points of the two convex polygons, Obviously this method seek out axis as a potential separating axis is undesirable. s shown in Figure 4 and Formula (5), we find the longer the OE, the more close to the vertex and the other convex polygons. So we will get two potential nearest points B and C. The normal vectors of the edges of containing point B and point C as potential separating axis, so there are only four potential separating axis. 112 n n 1 2 OB OE (5) cos BOE 3.2 Potential separating axis From the separating axis definition, which it is a kind of "optimists" algorithm. The literature [2]approach to take potential separating axis, as shown in Figure 5 with the edges of convex polygon increases, the potential separating axis also will increase. (4)

Fig. 4 Potential nearest points Fig. 5 Potential Separation xis Improved algorithm starts to find an effective center of two convex polygons - Center of gravity of convex polygon, the connection of the centers as a judging condition of the beginning, thus BB is replaced by this method as a rough pre-judgment conditions [6]. The specific approach is the all vertexes are projected onto the connection of the centers. if there is no overlap phenomenon, it can be judged without a collision, otherwise go to the next stage of testing. Fig.6 (b) is known, when the rough detection stage detects the two objects are overlap, but this phenomenon does not explain its has intersect, So it will enter accurate testing phase. The normal of the straight line of two potential closest points is used as potential separating axis. Fig. 6 (b) as shown, if B is one of the nearest points, then the another is the point B to the vertical line of edge CD, so one of the four separating axes is a line that this parallel to the line of the nearest points. s long as there is no overlap, you can determine that it does not collide. If overlap occurs then the two objects intersect, it is a good solution to the problems separating axis theorem. Fig. 6 Two convex polygons positional information 4. Improved algorithm overall description The following specific description of the improved algorithm: Step 1 Find out effective centers of two convex polygons. Step 2 Get in touch with the center wire four vertices intersect segment. Step 3 Enter the rough testing phase, the four vertices are projected onto the effective center connection, if there is no overlap, the two objects do not collide. Otherwise it proceeds to step Step4. Step 4 Step 4 will connect the vertical edge intersects with an effective separation of the central axis as a potential crash test accurate, if not overlap, you can determine that it does not collide, otherwise collision. 113

We can know from the improved algorithm, one can improve the accuracy rate of collision detection, on the other hand can provide efficiency of collision detection, reduce the average time of detection. 5. Efficiency Based on separating axis collision detection traditional algorithm, the entire algorithm takes place in two main stages: First, to establish the potential separating axis of each edge of the convex polygon, at this stage we need to traverse the vertex of each edge, and then find out the normal of edge as a potential separating axis (PS). Second, traverse all vertexes projected onto the potential separating axis, if you can find a this potential separating axis (PS) so that the two objects do not overlap on this projection, then the two objects will without collision. However, in two phases with the growth of the number of vertexes while becoming more complex. Compared with the separation axis collision detection traditional algorithm, this paper mainly takes the time to find the center of gravity. 6. Conclusion In this paper, with ST algorithm is proposed based on a vector to the closest point where the potential separating axis to determine whether two convex polygon collision. this paper improved collision detection algorithm to shorten the average time, improve the accuracy of collision detection, center of gravity of the convex polygon can get it in the pre-treatment stage. Most of the game engine have a fairly complete physical systems, such as Unity3D and Cocos2d-x are relatively well-known domestic, which contains its collision detection algorithms, but there are still some problems to be solved. In this paper, as well as combining popular game, we can try to extend our algorithm to the three-dimensional References [1] Zhi-qiang Wang, Jia-zhen Hong, Yang Hui. Survey of Collision Detection Problem[J]. Journal of Software, 1999, 10(5): 545-551. [2] S. Gottschalk, Separating axis theorem. Technical Report TR96-024, Dept. of Computer Science, UNC Chapel Hill,1996. [3] Rex van der Spuy. dvanced Game Design with Flash[M]. an press company, 2010. [4] Na Liu, Xiao-ju Mao. Based on Separating axis theorem collision detection algorithm[j]. Digital Technology and pplications, 2012.:102. [5] Shangfei Chen. lgorithm of Overlap Test to Oriented Bounding Boxes Based on Separation xis Theory[J]. Journal of Guangxi cademy of Sciences, 2005, 21(3): 196-198. [6] lejandro Garcia-lonso,Nicaolas Serrano and Juan Flaquer. Solving the Collision Detection problem[j]. IEEE Computer Graphics and pplication, 1994: 36-43. [7] Baofeng Gao, Kangqi Hu, Shuxiang Guo. Collision Detection lgorithm Based on BB for Minimally Invasive Surgery[J]. Proceedings of 2014 IEEE International Conference on Mechatronics and utomation. 2014:315-320. [8] Xu-shen Shi, Li-hong Qiao, Zuo-wei Zhu. lgorithm of Collision Detection Based on Improved Oriented Bounding Box [J.Journal of Hunan University(Natural Sciences), 2014, 41(5), 26-31. [9] Fa-ming Gong,Bo Gao, Qiu-li Niu, Li Zhang. n lgorithm of Rapid Collision Detection Based on Features Points[J]. Journal of Engineering Graphics, 2008, 6: 75-79. [10] Lin M C, Canny J F. fast algorithm for incremental distance calculation[c]. Proc IEEE Conf on Robotics and utomatior, 1991: 1008-1014. [11] Yong-jie Hao, Yu-bing Li, En-hai Liu. Calculation method of center of gravity[j]. Computer pplications, 2005,26: 391-393. [12] Tong-lang Huang,Min Tang, Jin-xiang Dong.Fast and accurate continuous collision detection between rigid bodies[j].. Journal Of ZheJiang University (Engineering Science), 2006, 40(6): 1051-1055. 114