Bending. When a car stands in the middle of a plank, the plank sags. For a beam resting on two ends the middle sags by
δ = P·L³ / (48·E·I) I = b·h³ / 12
P is the load, L the length, E how stiff the material is and I how well the shape resists bending. Because of h³, a plank twice as thick sags 8 times less. Doubling the length makes it sag 8 times more.
Stress. Bending squeezes one face and stretches the other. The strongest push or pull is σ = M·c / I, where M is the bending moment (about P·L/4 for a load in the middle). A piece "cracks" in this toy when the stress passes its allowed value (the colour turns red at 100%).
Why triangles. A square frame can lean sideways, so loads make its joints bend. A triangle cannot change shape without changing the length of a side, so loads turn into pure pushes and pulls along the sticks. Then the whole thickness of the stick works, σ = N / A, not only the outer skin. That is why bridges, cranes and roofs use triangles.
Why arches. An arch turns downward loads into pushes along the curve, ending as a sideways push (thrust) into the banks. Stone is very good at being squeezed and bad at being pulled, so the model lets stone take only a small pull. Arches work because the banks hold them from spreading.
How the computer does it. Every piece is a beam element with stiffness for stretching and bending. The program builds one big equation K·d = F for all joints (a finite-element frame), adds the weight of every piece and the two wheel loads at the car's real place on the road, solves it again and again as the car moves, and colours each piece by stress / allowed stress.
Independent check. The same element is tested on a simple case with a known formula:
…
Simplifications (honest list). Side view only (2D frame, same loads on both sides); joints are stiff like glue, real toy joints would be weaker; piece sizes, stiffness and allowed stresses are invented toy numbers, not a design code; the car drives very slowly so no bouncing is modelled (a real car adds extra shock load); no buckling of thin sticks, no joint or nail failure, no flowing water or wind. Banks and river bed are rigid. After a piece cracks, the rest is recalculated. Pieces cut off from the ground fall as rigid groups and splash; they do not stack or collide with each other. Not a design tool for real bridges.