Skip to main content

centerOfMass

centerOfMass (srcWave [, x1, x2] )

The centerOfMass function returns the 1D center of mass for srcWave X values from x=x1 to x=x2.

The centerOfMass function was added in Igor Pro 9.00.

Center of mass and center of gravity in a uniform gravity field are different terms for the same calculation. When the masses are of uniform density, the center of mass is also identical to the geometric centroid.

Details

The center of mass is defined as

 centerMass =xiyiyi,\displaystyle \text { centerMass }=\frac{\sum x_{i} y_{i}}{\sum y_{i}},

where the summation is over all the points in srcWave or over the X range specified by the optional parameters x1 and x2.

Each term in the numerator above can be written as

xiyi=[DimOffset(srcWave,0)+iDimDelta(srcWave,0)]srcWave[i].\displaystyle x_{i} y_{i}=[\operatorname{DimOffset}(\operatorname{srcWave}, 0)+i \cdot \operatorname{DimDelta}(\operatorname{srcWave}, 0)] \operatorname{srcWave}[i] .

In this notation, yi represents an individual mass at x = xi, and the returned value xc is the X location of the center of the aggregate mass.

See Also

centerOfMassXY, mean, area, SumDimension, ImageAnalyzeParticles