Populate 2d region with designated objects at a set proportion

Helloo, I’m looking for a way to create a similar effect to the one achieved in this link, where they populate it with objects randomly. The affect is great, but I’m not that well versed in GH so I’m hoping to get someone’s expertise on this!

Here’s the link to the original thread, which has the initial working script by Laurent Delrieu.

I realise I haven’t really explained the effect I am looking for…

What I’d like is for the objects to fill up a certain percentage of space within the region, and i wish to be able to control this.