This is a post where I delve into the concept of centre of mass (COM).
In practice in playing around with my simple 2D physics engine moving around simple shapes, the centre of mass is almost always .. well .. the centre of the shape. Combined with the assumption that the density of "matter" comprising the shape is uniform, we can go a long way by simply assuming the COM to be the "geometric centre" of the shape.
There are cases where the "geometric centre" is not immediately obvious (and as we will see later on, the centre of mass of shapes in 2D is not always the simple arithmetic average), and it is useful to understand how the "centre of mass" can be derived.
Before eventually getting to the concept of centre of mass, we will go through the following topics in order:- Area
- First Moment of Area
- Second Moment of Area
- Centre of Mass / Centroid
Area
\[A=\int _A \,dA= \iint dx\,dy\]
Volume
In comparison, the definition of volume is:
\[V=\int _V\, dV=\iiint dx\,dy\,dz\]
Mass
The total mass of a body is the density of the body times the total volume of the body. This is expressed as:
\[M=\int \rho _V dV=\rho \int dV\]
First Moment of Area
First Moment of Area is commonly used to determine the centroid of an area.
Definition of First Moment of Area
First moment of area about a particular reference axis is the product of the area of the shape and the distance between the centroid of that shape and the reference axis. It is a measure of the spatial distribution of a shape in relation to a particular axis.
For the shape shown in the above with area A, the first moment of area about the x-axis is given by,
\[Q_x=A\times y\]
Similarly, the first moment of area about the y-axis is given by,
\[Q_y=A\times x\]
First Moment of Area by Integral
Now, consider that the shape above is actually divided into n number of very small, elements each with area of \(dA_i\). Let \(x_i\) and \(y_i\) be the distances (coordinates) to each elemental area measured from a given x-y axis.
By the definition of the first moment of area of dA about the x and y-axes are given by:
\[dQ_x=y\times dA\]
\[dQ_y=x\times dA\]
It follows that the first moment of area about the x and y axes are respectively given by:
\[Q_{x}=A{\bar {y}}=\sum _{i=1}^{n}{y_{i}\,dA_{i}}=\int _{A}y\,dA=\iint y\,dx\,dy\]
and
\[Q_{y}=A{\bar {x}}=\sum _{i=1}^{n}{x_{i}\,dA_{i}}=\int _{A}x\,dA=\iint x\,dx\,dy\]
Second Moment of Area
This post is not about the second moment of inertia, but we will introduce the formula here since it is sometimes referred to as moment of inertia, same as the mass moment of inertia, which can create confusion, particularly as they are both typically denoted by capital letter \(I\).
It is a measure of how the cross sectional area is dispersed about the reference axis. It is typically used to measure the stiffness of a beam and its resistance to bending moments.
Definition
For bending around the x axis can be expressed as
\[I_{xx}=\int y^2\,dA\]
where,
\(I_{xx}\) = Area Moment of Inertia related to the x axis
\(y\) = the perpendicular distance from axis x to the element dA
\(dA\) = an elemental area
For bending around the y axis can be expressed as
\[I_{yy}=\int x^2\,dA\]
where,
\(I_{yy}\) = Area Moment of Inertia related to the y axis
\(x\) = the perpendicular distance from axis y to the element dA
\(dA\) = an elemental areaSimilarity to Moment of Inertia
The mass moment of inertia is the product of mass and distance squared.
\[I_{xx}=\int y^2\,dm\] \[I_{yy}=\int x^2\,dm\]
As you will note, formula wise, they are the same but with the area - dA - replaced by mass - dm.
However, the concept is totally different. It is a measure of how the mass of a system is dispersed about the reference axis. It is used as a measure of the system's resistance to rotation around the reference axis.
Centroid
Centroid or geometric center of a plane figure is the arithmetic mean position of all the points in the figure. Informally, it is the point at which a cutout of the shape (with uniformly distributed mass) could be perfectly balanced on the tip of a pin.
From the definition of First Moment of Area given above, it can be said that the centroid is given by diving the First Moment of Area by the total Area.
Hence, centroid (x, y) is given by:
\[\bar{x}=\frac{1}{A}Q_y=\frac{1}{A}\int _A\,y\,dA\]
\[\bar{y}=\frac{1}{A}Q_x=\frac{1}{A}\int _A\,x\,dA\]
Centre of Mass
The centre of mass is the point in a body around which the mas of the body is evenly distributed. Importantly, in the world of physics engines, the centre of mass is the point through which any force can act on the body without resulting in a rotation of the body.
In order to "calculate" the COM, you first divide the body into elemental masses, each with mass of dm, with the centre of each mass specified relative to the reference coordinate system axes.
Next, we take the first moment (here, first moment is referring to product of the mass times the distance along a given reference axis from the origin to the centre of the elemental mass) of each elemental mass about the refence axes and then add up all of these moments (ie perform the integral).
Finally divide the sum of moments by the total mass of the body M to give the centre of mass of the body relative to the reference mass.
\[x_c=\frac{1}{M}\int x_o \,dm\,dx\]
\[y_c=\frac{1}{M}\int y_o \,dm\,dy\]
\[z_c=\frac{1}{M}\int z_o \,dm\,dz\]
where \((x,y,z)_c\) are the coordinates of the center of mass for the body and \((x,y,z)_o\) are the coordinates of the center of mass of each elemental mass. The quantities xo dm, yo dm, and zo dm represent the first moments of the elemental mass, dm, about each of the coordinate axes.
The centroid and the center of mass coincide when the density is uniform throughout the body.
Useful References