Shear-building model
Each building is a stack of lumped floor masses joined by lateral storey springs (one horizontal degree of freedom per floor):
M ü + C u̇ + fs(u) = −M·1·ag(t). It is integrated with a central-difference (leapfrog) scheme at 1 ms. A uniform N-storey building has ωn = 2√(k/m) sin[(2n−1)π / (2(2N+1))] and the fundamental period T1 is tuned per type (about 0.10 s per storey for braced timber, 0.055 s for masonry).
Storey force and damage
Storey force follows an origin-oriented hysteresis loop. Timber is ductile (yield at ~0.35 % drift, small hardening, collapse near 2.5 %). Masonry is brittle: it cracks at ~0.08 % drift, softens to a residual strength and fails near 0.8 %. A P-delta term −P·δ/h adds the destabilising effect of gravity. Damage index D = max drift / collapse drift; the five damage states (none, slight, moderate, extensive, complete) use D thresholds 0.12 / 0.30 / 0.60 / 1.0 and are illustrative, not a fragility curve.
Ground motion
Random records pass white noise through a Kanai-Tajimi filter ẍ + 2ζgωgẋ + ωg²x = w (soil sets ωg), shaped by a rise-plateau-decay envelope, scaled to the target PGA and baseline-corrected. PGA comes from a generic attenuation shape ln PGA = −0.6 + 0.85(Mw−6) − 1.15 ln(1 + R/8) (illustrative, not a published equation). A near-fault record adds a long-period velocity pulse; the sine record shows resonance.
Response spectrum and resonance
Sa(T) is the peak pseudo-acceleration of a 5 %-damped oscillator of period T, computed with the exact piecewise-linear (Nigam-Jennings) algorithm. A building with period T1 in a spectral peak feels the amplification 1 / √((1−r²)² + (2ζr)²), r = T/Tg.
Base isolation
Lead-rubber bearings are modelled as a bilinear spring: elastic k1 = 9k2, yield at 5.5 % of weight, post-yield k2 = M (2π/Tiso)² with Tiso = 2.3 s, and a moat wall at 0.40 m that pounds when exceeded.
Debris, tiles and cracks
Fallen floors, blocks, planks and tiles are rigid 2-D boxes in the shaking plane with gravity (scaled by 1/3 to match the 1:3 model), restitution 0.25 and Coulomb friction coupled to the moving plate. Clay tiles start to slide when roof acceleration exceeds μg (μ ≈ 0.5). Crack decals are visual only; their opacity follows the damage index.
Honest simplifications
One horizontal direction, lumped masses, no torsion, no soil-structure interaction, no real material test data. Strengths, periods, drift limits and costs are typical or illustrative values, not for design. The platform and storey motion are drawn multiplied by the visual exaggeration slider; physics is unaffected. Debris does not collide with other debris. Not a substitute for a building code or an engineer.