Skip to content

Physics kit

Cargo featurefeatures = ["physics"]

The physics kit is the physics feature of fframes-kit (fframes-kit = { .., features = ["physics"] }). Its figures come with the prelude and need no other crates. Every entry names its scene in the components gallery (cargo run --release -p components-gallery -- strip <Scene> -n 8).

  • Placement. A figure stands alone and is placed in units of ui.space (Manim’s frame: 8 units tall, y up, the origin in the middle). scale says how many units one meter is, so a 10 m throw fits on the canvas with scale: 0.8.
  • Units. Quantities are SI: meters, seconds, kilograms, radians. GRAVITY is 9.81 m/s².
  • Time. Each figure runs on its own clock: the local time minus delay, times time_scale. Before delay it shows its start.
  • Simulations. A motion with a closed form (Projectile, Wave, Orbit, Collision1D) is computed per frame. One without (Pendulum, SpringMass) is stepped once, at 240 steps per second with RK4, into a motion value built in the video’s constructor (a OnceLock field, or a field set in new). The figure borrows it through motion: Some(&..) and draws nothing without it. Field lines are traced once the same way, into a Field.
  • Animation props. The fixed parts (ground, ceiling, wall) draw with enter; the moving parts fade with parts_enter.