Hi, currently I am trying to use the rand function to produce an N by 2 matrix to give random coordinates within a 1 by 1 square which works seeing as the rand function uniformly takes values inbetween 0 and 1. I then take each row of this matrix as the x and y coordinates on the square grid. I am looking for help to find a way so that each of these coordinates is at least some distance,a, from the nearest neighbour.
For example if specifies the position of 1 coordinate then the nearest neighbour should have the coordinate where .
This is meant to represent the radius of solid circles and how they shouldn't overlap.
Currently I am only using the basic rand function:
I have tried looking online for a specific solution but have not found one yet. Is there a way to set these kind of conditions on the rand function?
Any help is appreciated :)