Imagine you wanted to design a glass of soda. First you create a glass:

It's, in fact, a beaker - but that doesn't matter

Now you copy the object, make it smaller, black and delete the stroke. Then to try to center it in beaker:

full beaker

Finally, you want some pretty bubbles. How can I randomly distribute them in the brown area, besides copy pasting (which sucks for complicated shapes)?

  • 3
    I'have no time for a decent answer... give a look to the spray tool (see also here). Commented Oct 12, 2014 at 22:34
  • Bubbles are not random - they form from the imperfections and residue (and ice) inside the glass. The spread and distance from the source of the bubbles is relative to the liquid type and CO2 weight. Difference to fine champagne and Home brand cola when in a glass. I think you could make a brush where the bubbles could be stretched along its length became slightly larger and further apart the higher they traveled up the glass.
    – Mark Read
    Commented Oct 14, 2014 at 22:36

2 Answers 2


Let's get a try...

You can create your bubble (sorry, not so pretty):


With the bubble selected, press the spray tool (see also here):

Spray tool

You can tweak a bit with the tool options until the object are placed according to your wishes:

Tool options

Now, you can simply keep pressed your left mouse button down and place the bubbles while moving the mouse:

Final image

With a littler starting bubble and different spray settings:

Alternative image


You can use Randomize centers in both dimensions button under Rearrange in the Align and Distribute dialog.

  1. Select all the objects you want to randomize, then hold down the Shift key and make a single click on the encapsulator object.
  2. Open the Align and Distribute dialog via ObjectsAlign and Distribute menu item (or press Ctrl‌‌+Shift+A).
  3. Under Align, select Last selected in the Relative to drop down list.
  4. Under Rearrange, click Randomize centers in both dimensions button.


  • Unfortunately this only seems to work within the bounding box of the shape you are working with and not within the shape itself. Objects appear outside the shape borders. Commented Sep 9, 2021 at 2:02
  • seems that randomization works inside borders of current selection rectangle. you can always subtract objects that fell out of desired area...
    – Rast
    Commented Feb 4, 2022 at 23:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.