Post Reply 
Center of Mass - Matrix Representation
04-08-2015, 05:48 PM (This post was last modified: 04-08-2015 05:51 PM by Thomas Ritschel.)
Post: #5
RE: Center of Mass - Matrix Representation
(04-07-2015 06:33 AM)akmon Wrote:  I´ve tried a little example to manage the program, but I didn´t get the results I expected. I want to know the center of gravity of a triangle. The coordinates are (0,0), (5,0) and (5,5). I suppose mass 1 for every points, so I write this matrix:

[[0 0 1][5 0 1][5 5 1]]

The gravity center sould be (10/3 5/3), but I don´t get that result. What am I doing bad? Thank you.

Note that the matrix does not contain the coordinates and associated masses, but rather it's a grid representation of point masses. There is an explanation of the matrix in Eddie's blog.

For your example the matrix may be entered as (6x6 matrix, e.g. 0 to 5 = 6 grid points):

[[1 0 0 0 0 1][0 0 0 0 0 0][0 0 0 0 0 0][0 0 0 0 0 0][0 0 0 0 0 0][0 0 0 0 0 1]]

This will yield the center of mass at grid position (13/3 8/3), having a (+1 +1) offset with respect to your solution (note that the origin (0 0) is at grid position (1 1)).
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Center of Mass - Matrix Representation - Thomas Ritschel - 04-08-2015 05:48 PM



User(s) browsing this thread: 4 Guest(s)