hinges_py is a compact, minimal implementation of rigid-bodies with hinges, including rendering, in Python.
python hinges_py.py -scene chain -fancy
- -scene: Chooses one of the built-in scenes: 'test', '1', 'shoulder', 'chain'.
- -dt: Sets a fixed physics time step.
- -adapt_fixed_dt: Adapts the number of physics steps between render frames to make the simulation look time based.
- -flex_dt: The physics time steps is adaptively set to the current frame rate.
- -paused: Starts paused.
- -length: Exits after the specified amount of seconds.
- -baumg: Sets the Baumgarte stabilization factor.
- -grav: Sets a multiplier on gravity.
- -si_iters: The number of constraint block iterations.
- -fancy: Hides occluded wire-frame lines.
- -fill: Fills polygons instead of wire-framing them.
- -mono: Disables colors, uses monochrome balck and white.
- -print: Prints frame information to the console.
- -h: Prints any command line arguments that the running code is querying. E.g: The shoulder scene has additional arguments that are too specific to document.
- WASD, QE: Controls the camera.
- R: Resets the camera.
- Enter: Toggles pausing.
- Space: Step when paused.
- Escape: Exits.
- On a Mac, the application may start minimized.