Tag Info

Hot answers tagged

2

You may do what you need in 2 step: Clustering: First you can cluster your point. There are many clustering algorithms which will put your points into multiple close-distance group. K-means is one of your options. Convex Hull: Then you can create Convex Hull for each cluster. such as: Gift wrapping algorithm, Quick Hull, Bridge, ... There is a trade-off ...


1

I recently went through this exercise and evaluated both on a couple of platforms. I found that my engine had many moving objects clustering on top of each other. As they moved around the Sweep and Prune (SAP) implementation caused too much sorting and overlap callbacks every frame. It was crippling my platform, which is not too powerful. I did all the ...


1

The simplest thing to do given your existing code, assuming there are no other complications, is to check both on the dx step and the dy step. def get(x, y): # minimize code duplication return level.get_at((round(x), round(y)), True) while t < 5000: t += 1 x += dx obj = get(x, y) if obj: break y += dy obj = get(x, y) ...


1

Instead of trying to recognize the circle, recognize the islands. Every island is enclosed by a circle.


1

The way to discriminate that is to use the screen position intrinsic of GLSL gl_FragCoord (some call it a built-in variable). And pass it through a floating point function that will do the equivalent of a modulo in integers math. This way, you can use 2 as a divisor and the (floating point) alternation of the saw-dent-like ramps it will create (rising from 0 ...


1

The usual implementation for this is to have only a MaxMove function, and negate the value returned. You only need to remember the top level move, although remembering the path to the move that constitutes the principal variation can be helpful to understand the result, you only need to make the best move and re-run the search from the new position after ...



Only top voted, non community-wiki answers of a minimum length are eligible