Skip to main content
3 of 5
added 111 characters in body
Nicola Sap
  • 13k
  • 3
  • 58
  • 84

Use two objects: your shape (are they $s$ and $p$ atomic orbitals?) to generate particles, and a fattened version of it to contain them.

Result:

enter image description here

(workbench)

enter image description here

(eevee)

##Procedure

###Emitter object

On your main shape, add a Particle System. Things to change with respect to the defaults:

  1. Emission > "Frame End" must be 1 (all particles emitted at the beginning of time), "Lifetime" as long as you like
  2. Emission > Source > "Emit From" should be "Volume"
  3. Velocity > "Normal" should be 0
  4. Physics > Forces > "Brownian" to some value around 3
  5. Field Weight > "Gravity" to 0
  6. Render > "Render As" to "Object" (then select a UVSphere to duplicate)

Container object

Duplicate your main object, and remove the Particle System from the duplicate.

In Edit Mode, use the Shrink/Fatten tool (you can find it using Search or in the T toolshelf) and fatten it a bit. Then invert its normals: CtrlShiftN so that they point inwards.

In the Physics panel, activate Collision. Default parameters work well.

Since this is an helper object, you may want to restrict its render visibility in the Outliner, and to make its Viewport Display > Display as Wires in the Object properties.

Nicola Sap
  • 13k
  • 3
  • 58
  • 84