D
D
Daniel2021-01-18 06:32:03
Algorithms
Daniel, 2021-01-18 06:32:03

How to randomly generate points on the plane, so that the closest to them correspond to the connections to the nodes of the graph?

The task is a Graph, where it is conditionally shown which point should be the closest. It is necessary to generate randomly and scatter the points on the plane so that the connections between the nearest points do not intersect. .
Here is an example input.
600500c02e023174300489.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-01-18
@rPman

the solution will walk around exactly how the condition is worded:

where it is conditionally shown which point should be the nearest

for example, if these are specific values, then the solution will be in finding the intersection of circles around each vertex and its neighbors
. Further, this task can be expanded, if each of these values ​​​​will have a delta circle (i.e., distances are indicated as min / max) then we are looking for not intersection points and the intersection area of ​​​​the rings, well, and combinatorics, into which area which point to push so that there are no contradictions, with each step of the algorithm increasing the number of vertices taken into account - with laboriousness in the factorial.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question