I have a problem with given polygons. I am trying to figure out the vertex (or corner) weights. I do have the center of mass and the mass. Right now i tried simplifying the problem to a simple rectangle for text purpose. The real polygons have a lot more edges.

So my sample rectangle i used a 2d plane and the following coordinates : [0,0] [10,0] [10,5] [0,5] My center of mass is at [0.285,2.5] and weight 1000 units

For simplicity reason (you can calculate it if you want) the weight is centered in Y but the 2 left point has exactly 10% of the total distance if it add all distance from each corner to center of mass. So both left corner are 10% and both right corners are 40% this total to 100%. The problem i have the closest sides need to have more weight. Technically 4 times as much as the other sides. Both left side should have 400 weight unit and both right side corner need 100 weight unit.

I tried reversing the percentage but i end up with 90% and 60% and splitting the weight ends up obviously being way more than what i started with. I am wondering on how this can be done.

Overall i am looking for a way to nicely allocate more weight the closer the point is if it make any sense.


1 Answer 1


Call the vertices of your polygon $(x_i, y_i)$, and let $d_i$ be the distance from $(x_i, y_i)$ to the center of mass. The amount of mass we should distribute to $(x_i, y_i)$ is inversely proportional to its distance from the center of mass, so the fraction of the mass it should receive is $$ \frac{1/d_i}{\sum_{j=1}^n 1/d_j}, $$ and thus the mass that should be allocated to $(x_i, y_i)$ is $$ \frac{1/d_i}{\sum_{j=1}^n 1/d_j} \cdot M, $$ where $M$ is the total mass you want across all the vertices.

  • $\begingroup$ So this morning i am at work and i have the full datasets and it doesn't work for all points. I have retried with example listed and i cannot go back and forth between center of mass and mass distribution. Center of mass is exactly at [2,2.5] but distribution 1000 over the same point as example gives 361 for the left point and 138 for the right points and it should be 400 and 100. $\endgroup$
    – Franck
    Commented Nov 22, 2019 at 16:07
  • 1
    $\begingroup$ Why should it be 400 and 100? If the center of mass is supposed to be at (2, 2.5), rather than the (0.285, 2.5) you had before, the right points are no longer four times as far from the center of mass as the left points, so they shouldn't have exactly one-fourth of the mass. $\endgroup$ Commented Nov 22, 2019 at 16:12
  • $\begingroup$ Oh ok i get the mistake. The value is distributed over the whole surface not only the specific points. If i were to distribute 400 weight from [0,0] to see what it is at [0,0] then i would get 400 as a result. My mistake. I used Solidworks as validation and it gives per vertex but not distributed. You are right. $\endgroup$
    – Franck
    Commented Nov 22, 2019 at 16:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .