Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

phys.measureSoftBody

Measure how a soft body (a deformable: a crumple zone, a pad, a panel, a plastic or elastic material) responds to a stated load, on a copy of it built from its component as authored (shape, material, regions, in the shape it was built in, or at the entity's pose and scale when the live body is not built yet) and stepped in a world of its own at the tick and solver iterations the world's settings state; the live body is untouched. press = { depth, axis?, speed?, hold?, settle?, friction? } presses it between two plates along its own axis ("x", "y" or "z", default "y") to depth metres at speed (default depth over 2 s), holds, withdraws the plate at that speed while the body pushes on it and lets the body settle clear of it, so permanentSet reads what it kept; the plates are frictionless unless friction says otherwise, so stiffness, the initial slope of the load against the press, reads the material's own (E A / L for an elastic block). impact = { speed, direction?, radius?, offset?, carried?, duration?, friction? } sends it at speed along its own direction (default "-z", the way a chassis drives; "-y" lands it on a floor) into a post of radius metres, or a wall when radius is left out, with carried kilograms riding on a rigid block held to its trailing face (a car's frame behind a crumple zone, a body landing on a pad), and reports the crush, peakForce, peakDeceleration, rebound and the share of its energy it absorbed. drop = { height, duration?, friction? } drops it onto a floor under the world's gravity. Every test answers samples, one array per quantity with one entry per step (samples.force[i] and samples.displacement[i] are step i): time, displacement, force, kinetic, elastic, absorbed and velocity, and the energy at its end, with stability, the measured copy's stability report at the rate the test ran it (whether the solver holds its material as stated; a body not built yet reads one too).