space-partitioning

What is a coarse and fine grid search?

社会主义新天地 提交于 2020-04-13 17:01:12
问题 I was reading this answer Efficient (and well explained) implementation of a Quadtree for 2D collision detection and encountered this paragraph All right, so actually quadtrees are not my favorite data structure for this purpose. I tend to prefer a grid hierarchy, like a coarse grid for the world, a finer grid for a region, and an even finer grid for a sub-region (3 fixed levels of dense grids, and no trees involved), with row-based optimizations so that a row that has no entities in it will

How to do a space-partitioning of the Utah Teapot?

蹲街弑〆低调 提交于 2020-01-13 16:55:37
问题 Having dealt with converting the Bezier Patches into triangles, I need to do a Binary Space Partition in order to draw the projected triangles using the Painter's Algorithm. I've implemented the algorithm from Wikipedia with much help with the math. But it's making a Charlie Brown tree! That is most of the nodes have one branch completely empty. The whole strategy is all wrong. Since the teapot is essentially spherical, the entire shape is only on one "side" of any particular component

How does space partitioning algorithm for finding nearest neighbors work?

烈酒焚心 提交于 2019-12-22 07:44:11
问题 For finding the nearest neighbor, Space Partitioning is one of the algorithms. How does it work? Suppose I have a 2D set of points (x and y coordinates), and I am given a point (a,b). How would this algorithm find out the nearest neighbor? 回答1: Spacial partitioning is actually a family of closely related algorithms that partition space so that applications can process the points or polygons easier. I reckon there are many ways to solve your problem. I don't know how complex you are willing to

When to use Binary Space Partitioning, Quadtree, Octree?

时光怂恿深爱的人放手 提交于 2019-12-18 09:53:25
问题 I have recently learned about binary space partitioning trees and their application to 3d graphics and collision detection. I have also briefly perused material relating to quadtrees and octrees. When would you use quadtrees over bsp trees, or vice versa? Are they interchangeable? I would be satisfied if I had enough information to fill out a table like this: | BSP | Quadtree | Octree ------------+----------------+------- Situation A | X | | Situation B | | X | Situation C | | | X What are A,

Looking for a good space-partitioning data structure to generate millions of atomic bonds quickly from

人走茶凉 提交于 2019-12-07 00:21:37
问题 I'm performing some MD simulations involving systems of millions of atoms. I have written some code to generate a file which is just a listing of XYZ atom coordinates. Now I need to generate bonds between the atoms. If two atoms are within a certain distance of each other, that is considered a bond. Example XYZ file: 1 0 0 2 0 0 7 0 0 10 0 0 9 0 0 So I've got five atoms. If my distance threshold is 2 units, then my bond listing will be: 1 2 3 5 4 5 (where the numbers correspond to the index

How does space partitioning algorithm for finding nearest neighbors work?

三世轮回 提交于 2019-12-05 09:14:24
For finding the nearest neighbor, Space Partitioning is one of the algorithms. How does it work? Suppose I have a 2D set of points (x and y coordinates), and I am given a point (a,b). How would this algorithm find out the nearest neighbor? Spacial partitioning is actually a family of closely related algorithms that partition space so that applications can process the points or polygons easier. I reckon there are many ways to solve your problem. I don't know how complex you are willing to build your solution. A simple way would probably to build a binary tree cutting the space into 2. All the

Looking for a good space-partitioning data structure to generate millions of atomic bonds quickly from

*爱你&永不变心* 提交于 2019-12-05 05:29:42
I'm performing some MD simulations involving systems of millions of atoms. I have written some code to generate a file which is just a listing of XYZ atom coordinates. Now I need to generate bonds between the atoms. If two atoms are within a certain distance of each other, that is considered a bond. Example XYZ file: 1 0 0 2 0 0 7 0 0 10 0 0 9 0 0 So I've got five atoms. If my distance threshold is 2 units, then my bond listing will be: 1 2 3 5 4 5 (where the numbers correspond to the index of the coordinate in the XYZ file). The naive approach to generate this list is just: for i = 1:numAtoms

Space partitioning algorithm

北慕城南 提交于 2019-12-04 00:54:46
I have a set of points which are contained within the rectangle. I'd like to split the rectangles into subrectangles based on point density (giving a number of subrectangles or desired density, whichever is easiest). The partitioning doesn't have to be exact (almost any approximation better than regular grid would do), but the algorithm has to cope with the large number of points - approx. 200 millions. The desired number of subrectangles however is substantially lower (around 1000). Does anyone know any algorithm which may help me with this particular task? Just to understand the problem. The

When to use Binary Space Partitioning, Quadtree, Octree?

左心房为你撑大大i 提交于 2019-11-29 18:42:07
I have recently learned about binary space partitioning trees and their application to 3d graphics and collision detection. I have also briefly perused material relating to quadtrees and octrees. When would you use quadtrees over bsp trees, or vice versa? Are they interchangeable? I would be satisfied if I had enough information to fill out a table like this: | BSP | Quadtree | Octree ------------+----------------+------- Situation A | X | | Situation B | | X | Situation C | | | X What are A, B, and C? Nils Pipenbrinck There is no clear answer to your question. It depends entirely how your