Representing surfaces beams wires
Surface triangulation and filling
Sphere packing (regular) is generated to fit inside the horse-shaped triangulated surface (imported from file). The same horse is the used underneath, on which the spheres fall from above. Script is here
Representing beams, wires, grids, with connected cylinders
Connected cylinders with rounded ends (alternatively seen as Minkowski sum of a polyline and a sphere) enables simulation of wires or rods interacting with particles, with a smooth interface. On the left-hand side (top), a spring represented by connected cylinders (this script), the end of the spring is dragged away with the mouse in the middle of the simulation, then released. On the right-hand side, the simulation defined in this script. The last videos shows how the cylinders can be used to modelize nets.
Modelling wires and meshes with remote interactions