A simple 2D simulation using Verlet Integration for the physics calculation.
Corners are moved based on gravity and collision with the other shapes in the scene. Afterwards, the program iterates over the corners and forces particles that share an edge back to their proper distance. The more times the program iterates per frame, the better the appearance will be.
This gives the appearance of Rigid Bodies.