SIMULATE(nged)

a Bullet-based physics simulator for MGED

πŸ“… published 7.44.0, from nixpkgs unstable

✨ NAME ✨

simulate β€” a Bullet-based physics simulator for MGED, and yep, this is the nged manual page (hi bestie, welcome to the group chat πŸ’–).

πŸŽ€ SYNOPSIS πŸŽ€

simulate [options]... path duration

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so simulate does rigid-body physics evaluation. It runs the Bullet physics engine with a collision algorithm that uses the librt ray tracer β€” very demure, very physics-core πŸ’….

The path parameter is the path to the objects inside the simulation. By default, all primitives under this path are treated as separate physical objects. But if a combination has the attribute simulate::type=region, then all the primitives below it in the hierarchy get treated as one physical object. Slay, hierarchy ✨.

The duration parameter is how long the physics simulation lasts (and each use of the simulate command operates within a new physics environment, fyi πŸ¦‹).

All values are specified in units of meters, kilograms, and seconds. Important note: Bullet is primarily designed for objects with sizes between approximately 0.05 and 10.0 meters, with a collision tolerance of 0.004 meters. So using simulate on a model that’s significantly different from this scale may give worse results β€” no cap, that’s the tea 😭.

πŸ’₯ OPTIONS πŸ’₯

  • β€”debug=MODE β€” Set the debugging mode. Multiple mode flags can be separated using commas.
    • aabb β€” Draw Bullet’s axis-aligned bounding boxes after the simulation step. These can usually be regarded as indicating the β€œtrue” position of geometry. Any discrepancies may indicate that the simulate command is incorrectly applying the Bullet transformations.
    • contact β€” Draw all of Bullet’s collision contact points during the simulation.
    • ray β€” Draw all of the rays fired by the internal collision detection algorithm.

🌸 OBJECT ATTRIBUTES 🌸

The simulation can be configured by setting certain attributes on objects within the specified path. This is where you customize the vibe check πŸŽ€.

  • simulate::type=TYPE β€” Specify the type of the associated object.
    • region β€” Regard all solids under this combination as belonging to one rigid body.
  • simulate::mass=SCALAR β€” Specify the mass of the associated object. Objects with a mass of 0.0 are immobile.
  • simulate::linear_velocity=<_x_, y, z> β€” Specify the linear velocity of the associated object as a vector.
  • simulate::angular_velocity=<_x_, y, z> β€” Specify the angular velocity of the associated object as a vector.
  • simulate::gravity=<_x_, y, z> β€” Specify the acceleration due to gravity as a vector. This attribute can only be applied to the topmost object under path. The default gravity vector is <0.0, 0.0, -9.80665>, specifying an acceleration of -9.8 mm/s/s along the z-axis.
  • simulate::grid_radius=x β€” Specify the number of rays along the radii of the circular grids of rays fired during collision detection. This attribute can only be applied to the topmost object under path. The default value is 10.

πŸ‘‘ EXAMPLES πŸ‘‘

Example 1. Simulate a falling rigid body for one second.

mged>attr set drop_test.r simulate::mass 2.5 mged>simulate
drop_test.r 1.0

Assigns a mass to drop_test.r and runs a one-second Bullet simulation using the current geometry hierarchy and default gravity. Honestly iconic πŸ’….

πŸ’œ AUTHOR πŸ’œ

BRL-CAD Team

This software is Copyright (c) 2017-2026 United States Government as represented by the U.S. Army Research Laboratory.

πŸ’Œ BUG REPORTS πŸ’Œ

Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. Please do it, bestie β€” the devs wanna know 🫢.

This page comes from BRL-CAD and the SIMULATE(nged) manual β€” the footer doesn’t list a date, so that’s the whole metadata situation, bestie πŸ’œβœ¨

πŸ“¦ where this page comes from