# How to randomly distribute a specific number of instances?

I would like to distribute a specific number of instances (say, a torus) on a mesh (say, a plane), using geometry nodes. This answer got me close, as you can see:

However, when I increase the number of instances they do not distribute randomly, but rather from the bottom up:

Can someone a) help me understand why this is, and b) how I can fix it to make them randomly distribute?

Thanks

The indices of points spawned by "Distribute Points on Faces" are not random - there is a clear correlation between faces and point indices. I didn't investigate the source, but it seems:

• the algorithm estimates how many points need to be spawned per face, to distribute the points evenly across the entire surface (I do the same thing below),
• then the algorithm goes through face by face (I think actually through the triangulated faces), spawning the calculated number of points on each face (or with calculated probability), similarly to what I do [here],(https://blender.stackexchange.com/a/221597/60486)
• finally it seems the algorithm does a second pass if not enough points were spawned?

Not sure, maybe something completely different happens.

The solution is to either implement your own "Distribute Points on Faces", which I think isn't that hard, or use the dedicated node, but then shuffle the indices, which I do below:

Am I missing something?

..and point indices seem to be randomly distributed too, for further segmentation of the space.

• ..OK, this doesn't address the more general case Oct 7, 2023 at 9:15
• Hi Robin, thanks for this. I wasn't aware of the "Points" node. I am using Blender version 3.1.2, and it looks like maybe "Points" was introduced later than this? I think your answer solves my problem - but I'm not sure what you mean that it doesn't solve the general case? Oct 9, 2023 at 10:00
• Hi, @teeeeee the wizard's solution can be used to randomly distribute n points across any set of faces.. mine will only work evenly on a square plane.. it needs tweaking even for a rectangle, so his answer is much stronger. In fact I think I should delete this one. Oct 9, 2023 at 10:29
• Ah, I see. As long as the limitations are pointed out, I think keep it here (I found it usefu, as someone who is starting to learn Geo Nodes, so maybe others will). I will accept the other answer. Thanks again. Oct 9, 2023 at 10:47