and similarly for the y coordinate.
Now, for the new cell with additional pixel we have the following relation:
where we have added and subtracted to be able to form on the right hand side of the expression for . As it was the case for diagonal element, calculating off-diagonal of the inertia tensor involves and positions of center of mass of the cell before and after gaining new pixel. All those quantities are either known a priori () or can be easily calculated (center of mass position after gaining one pixel).
Therefore we have shown how we can calculate tensor of inertia for a given cell with respect to a coordinate frame with origin at cell's center of mass, without evaluating full sums. Such "local" calculations greatly speed up simulations
Share with your friends: |