# Specify the size of points and square in RandomPoint?

Posted 1 month ago
180 Views
|
3 Replies
|
1 Total Likes
|
 The following two lines generate almost exactly what I want: pts = RandomPoint[Rectangle[], 250] Graphics[{ImageSize->Small,PointSize[Tiny], Point[pts]}] However, I want to be able to specify specific sizes for the points (i.e. diameter of 1.5 microns on a square that is 1000 um x 1000 um). Is there a way to do set these parameters?If not, is there a good function in Python that would allow me to randomly plot circles of specific diameters on squares of specified size?
3 Replies
Sort By:
Posted 1 month ago
 You can give PointSize[r] where the radius r is relative to the width of the whole picture. Otherwise you can use Disk[{x,y},r] where r is in the radius in the internal coordinates of the plot. These two methods behave differently, for example, when the AspectRatio is not Automatic.
 Might modify one of the methods from here to find fixed radius nonoverlapping random disks.Alternatively, generate more than needed and use Nearest to determine when neighbors come too close to each point, discarding the neighborts when that happens.