In order to simulate dynamic behaviour of a rigid-body, one requires knowledge of a set of rigid-body parameters such as the total mass of the rigid-body, the center of mass, as well as the moments and products of inertia. The purpose of this submission is to provide a function that can compute exact rigid-body parameters of objects represented by closed, triangular surface meshes. The principles underlying all computations are based on the divergence theorem and are explained in detail in the attached document.
This submission also includes two functions that take as input an arbitrary mesh and output parameters of a primitive object, such as an ellipsoid or a cuboid, with exactly the same inertial parameters as the input object.
Finally, ‘VisualizeLocaFrame’ function can be used for visualizing local frames of reference constructed from principal axes of inertia.
To get started, un-zip the folder titled 'Rigid Body Parameters' and add it to your MATLAB path. Then enter the following code into your command prompt:
If you run into problems using submitted functions, please report them here:
Anton Semechko (2020). Rigid body parameters of closed surface meshes (https://github.com/AntonSemechko/Rigid-Body-Parameters), GitHub. Retrieved .
Assuming uniform material density, to add back dependence on mass, multiply inertia tensor in the RBP structure by density (i.e., object mass / object volume)
@ Lewis Walker, please read the attached 'Rigid-body Parameters Using Divergence Theorem' document. All calculations are based on the assumption of constant density of 1 (mass unit)/(whatever units your mesh is represented)^3. If you scale the mesh by a factor s, the corresponding 0-th, 1-st, and 2-nd moments will change by respective factors of s^3, s^4, and s^5.
How can I add back density dependence in the calculation of inertia tensor? If I rescale the input object while maintaining the same mass, the inertia tensor does not match the change. When I use the new tensor to calculate a moment of inertia it does not scale properly
Great program! But the InertiaBasedLocalFrame function miss..
Excellent program.Thank you very much!
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!