Docs

Forces and motion

Keep annotations and animation tied to one physical solution.

PhysLoom separates what is solved from what is shown. Entities, relations, and parameters define the model; show selects annotations and animate requests animation.

Show solved results

show cargo.forces R.tension cargo.displacement cargo.force_diagram

forces places force vectors in the main scene; force_diagram produces a separate free-body diagram. Vector direction and magnitude come from the solution rather than renderer guesses.

When a diagram becomes crowded, keep only what the current explanation needs. Hiding tension or weight does not change the model; it only reduces visual noise.

Request motion

Every animation uses animate. For example, run three experiment seconds at half speed:

animate duration=3s speed=0.5

duration is experiment time; speed is a multiplier, defaulting to 1. This takes six screen seconds while advancing the experiment by three seconds. Speed never changes forces, velocities or trajectories. For prescribed rope-end travel, use animate R.free distance=1m duration=2s speed=1.

When the model determines an event or cycle endpoint, omit duration:

animate left speed=0.25
animate planet speed=8e6
animate electron speed=1e-8

These are separate examples for different scenes. Orbital motion needs fast playback; microscopic motion needs slow playback. The multiplier has the same meaning in both. The compiler selects the appropriate solver and reports unsupported motion rather than inventing it.

Animation shares physical state

Body position, rope segment length, spring extension, velocity vectors, and readouts must sample the same MotionClip. At every paused frame, geometry, values, and forces remain consistent.

Removing animate produces the static diagram. Do not use hand-authored keyframes to hide a missing physical solver.

A complete example

scene moving_pulley

support ceiling orientation=horizontal
load cargo 20kg
pulley M, F

M <-> cargo
F <-> ceiling

rope R
R: ceiling -> M -> F -> R.free

animate distance=1m duration=3s speed=1
show R R.displacement cargo.displacement cargo.force_diagram

This source declares physical attachments and names the rope R to select its tension and free-end displacement. Static tangent points, mechanical advantage, load displacement, free-end motion, and the force diagram are projections of the same solved topology.