Event-based simulation of a pencil falling over.
This simulation was made after reading Tad McGeer's 1989 paper: "wobbling, toppling, and forces of contact". It is designed to study the effects that moment of inertia and contaact friction have on the outcome of the simulation.
MAIN.m -- Runs a simulation
FIGURE*.m -- Batch run of simulation to generate a figure.