Is it possible to generalize a Voronoi diagram into a k-means cluster? - computational-geometry

In a n-dimensional Euclidean metric space, given a Voronoi decomposition for a set of S points (computed with Bowyer-Watson algorithm), is it possible to generalize k (with k<S) geometric clusters by converging multiple Dirichlet domains?

Related

How to modify A* algorithm in order to find the minimum energy path between 2 points?

If I have an array of 3 dimensional points, how can I modify the cost function in the A* algorithm in order to find the minimum energy path from point A to point B? Originally the algorithm uses Euclidean distance + the heuristics to decide which of the neighboring points to consider first. I couldn't find any useful resource, neighter on the physics side.

Fastest algorithm to compute the shortest distance between 2 regions of set of points [duplicate]

I want to find the minimum distance between two polygons with million number of vertices(not the minimum distance between their vertices). I have to find the minimum of shortest distance between each vertex of first shape with all of the vertices of the other one. Something like the Hausdorff Distance, but I need the minimum instead of the maximum.
Perhaps you should check out (PDF warning! Also note that, for some reason, the order of the pages is reversed) "Optimal Algorithms for Computing the Minimum Distance Between Two Finite Planar Sets" by Toussaint and Bhattacharya:
It is shown in this paper that the
minimum distance between two finite
planar sets if [sic] n points can be
computed in O(n log n) worst-case
running time and that this is optimal
to within a constant factor.
Furthermore, when the sets form a
convex polygon this complexity can be
reduced to O(n).
If the two polygons are crossing convex ones, perhaps you should also check out (PDF warning! Again, the order of the pages is reversed) "An Optimal Algorithm for Computing the Minimum Vertex Distance Between Two Crossing Convex Polygons" by Toussaint:
Let P = {p1,
p2,..., pm} and Q = {q1, q2,...,
qn} be two intersecting polygons whose vertices are specified
by their cartesian coordinates in
order. An optimal O(m + n)
algorithm is presented for computing
the minimum euclidean distance between
a vertex pi in P and a
vertex qj in Q.
There is a simple algorithm that uses Minkowski Addition that allows calculating min-distance of two convex polygonal shapes and runs in O(n + m).
Links:
algoWiki, boost.org, neerc.ifmo.ru (in russian).
If Minkowski subtraction of two convex polygons covers (0, 0), then they intersect

Shortest distance between two polygonal lines

I'm trying to calculate the shortest distance between two polygonal lines. I had thought of using a sweep algorithm but I don't know what events to take into account because the vertical ray can intersect between two vertices, a vertex and an edge or two edges. What will my events be? Is there any other way to calculate the distance?
The minimum distance will always be achieved by a segment one end of which is a vertex of one of the polygonal chains P1 or P2. Even if the min distance is achieved by two parallel edges, an endpoint of those edges also realizes the min distance.
So a naive algorithm is to iterate over all vertices v1 of P1, find the minimum distance from v1 to P2.
The problem of finding the minimum distance between v and P can iterate over each edge of P.
What I am describing is a quadratic algorithm. If you want to achieve the optimal O(n log n), you will need to compute a Voronoi diagram.

Building a graph with minimal local average clustering coefficient

Say I am given n vertices and m edges.
I aim to build a connected undirected graph with minimal average local clustering coefficient.
Are there any algorithms that build such a graph? How would such an algorithm work?

Whats the name of this path-finding algorithm?

The pictures show a graph of nodes arranged like a pixel grid with straight rows and columns. Every node (except for the ones on the edge) have 8 edges, which all go to the closest 8 nodes around it. The picture on the right shows an A* search with a simple distance travelled + euclidean distance to goal heuristic.
Now, i say that the path given by the picture on the right isn't good enough. Instead i want a path that you would get if you would connect the start node and the goal node with the shortest possible string. What is the algorithm for getting that called?
Finding Euclidean shortest paths based on a 2D grid discretization of the traversable space can be performed with the Theta* algorithm.
The other (more commonly employed) approach is based on a standard 4-way or 8-way pathfind (the picture on the left), followed by a "string pulling" optimization. The most common algorithm for this is known as the "Funnel algorithm".
Note that neither of these approaches is guaranteed to produce the globally shortest path. Also, these assume that you're set on representing the world as a grid; if you instead represent it as a set of convex polygons, other algorithms are more appropriate.
This is a 2D Euclidean shortest path problem with polygonal obstacles.
For an algorithmic solution, check these two references:
Hershberger, John; Suri, Subhash (1999), "An optimal algorithm for Euclidean shortest paths in the plane", SIAM Journal on Computing 28 (6): 2215–2256, doi:10.1137/S0097539795289604.
Kapoor, S.; Maheshwari, S. N. (1988), "Efficient algorithms for Euclidean shortest path and visibility problems with polygonal obstacles", Proc. 4th ACM Symposium on Computational Geometry, pp. 172–182, doi:10.1145/73393.73411, ISBN 0-89791-270-5.

Resources