Monday, May 20, 2024
HomeGame Development2d - Moment of inertia of an arbitrary grid of squares with...

2d – Moment of inertia of an arbitrary grid of squares with different masses


I’m making a game where the player can create a 2D spaceship, one square “tile” at a time.

In order to simulate the kinematics of the ship I need :

  • To compute the CoM vector. That’s easy enough : CoM = Σ (m_i * r_i), where r_i is the position vector of each tile relative to the world origin)

  • To compute the moment of inertia M of the whole grid.

The second point is where I struggle.

I know that : M = Σ(m_i*r_i²) with r_i being the distance from the axis of rotation (in my case the CoM).

I also know that the moment of inertia of a square of side a (with uniformly distributed mass) is (a^4)/12.

My first attempt was to just compute M as Σ(m_i*r_i²) where r_i² is the distance between the CoM and the center of each tile.
However, given a grid of a single tile, this solution gives M=0, when I would expect (a^4)/12.

Could you hint me in the right direction ? I know this seems like an easy problem, but I couldn’t find much of anything on the internet.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments