0

Intro

As the title says, I'm looking for a way to calculate the weight (or even better, the percentage of weight) at multiple points on a rigid object. Long story short, I'm making a game and need to find a way to calculate the distributed loads on 1-to-many points.

Example

An example would be a simple table. 4 legs with a rigid sturdy top weighing 100lbs. If I put a scale under each leg, we can assume the applied downward force would push on each leg (relatively) equally. I can assume all 4 legs would be able to carry 25lbs or 25% of the table's weight. Now, what if I put a box weighing 50lbs in the center? Again, we can assume the weight would be relatively evenly distributed. Now what if I moved that box to one edge. I would assume the scales closest to the box would carry more weight. But how much more? How do I calculate that? Even more so, how do I calculate weight percentages on scales that are not so evenly placed? Or if there are more than 4 points, especially not distributed evenly?

Story (Optional read)

My game is going to be based on "hover craft". So I am currently trying to displace their mass * gravity so they hover above the ground at a set height. Below is a screenshot of a "space ship" in the game I'm making from the top down. The second picture is of the same ship, but without the ship model. The white pucks you see are actually "Boosters" which are supposed to be supplying a force equal to the weight of the ship at that point. (For demonstration purposes, assume all of the pucks are attached rigidly and there is no bend/play in any material - even if by an imaginary line). I've placed the pucks arbitrarily because I will eventually have non-symmetrical ships and I would like to account for changing masses on the ship, like a weapon falling off or an entire booster falling off.

For reference, my ship has a total mass of 1125, which comes out to a weight of 11036.25.

enter image description here

enter image description here

This second shot shows better the placement of the boosters. Again, each white puck is a booster. The magenta lines lead towards the calculated center of mass. The concentric circles are just the circumference based on the radius of the closest (light purple), farthest (blue) and average (purple) distances from the COM. Below are two screenshots, one with x, y, z coordinates and the second is with each of their distances from COM.

enter image description here enter image description here

Finally, with code, I've made "scales" that will measure the weight and calculate their own percentage during run-time. I've placed the scales directly below each booster so that I can see the percentage of weight each booster will need to carry. I can't use this during run-time for various reasons, but to find the final answer and (I hoped) to work backwards, I at least have the final percentages.

enter image description here

I've tested these percentages and they work very well, though again, I cannot use the "scales" system within the game at run-time for multiple reasons.

What I've tried

I'm not very smart when it comes to math. I've been learning a lot in the past 2 weeks trying to figure this out. I've done about 12 different varieties of hover craft mechanics. Most of which include simply distance to the ground. The issue with all of them is that it does not account for the weight of the ship properly. I've started to learn moments since I've read and been told it's probably the best way to measure the amount of force needed at a distance from the rotation point, though I have not found a way to do it in 3 dimensions. I've found multiple videos explaining things that I try, though I'm not exactly able to wrap my head around. I've even been told to look into gradient descent to find the best answer. Also it was suggested to look into the Winkler Medium Model?

Reiterating the question

So, how do I calculate the distributed weight across multiple points?

Puk
  • 13,526
  • 1
  • 22
  • 42
ntgCleaner
  • 101
  • 3

1 Answers1

1

Suppose your table or ship is supported by forces $\vec F_i$ applied at $N$ fixed points. In general, there are two vector equations you need to solve. In order for the ship to remain suspended, the net force on it must be zero:

$$\sum_i \vec F_i=-\vec G$$ where $\vec G$ is the weight. In addition, the net torque must be zero so that the table/ship does not rotate: $$\sum_i \vec r_i \times \vec F_i = 0.$$ where $\vec r_i$ are the positions at which the forces are applied, relative to the center of mass (which I'm assuming is the same as the center of gravity, i.e. the gravitational field is uniform). $\times$ here denotes cross product.

If all forces are in the same (vertical) direction, the equations you need to solve can be simplified somewhat. Namely, if $\vec F_i = F_i \hat z$ and $\vec G = -G\hat z$, $$\sum_i F_i=G$$ $$\sum_i x_iF_i=0 $$ $$\sum_i y_iF_i=0 $$

Note that this is a linear system of three equations.

  1. For $N = 1$, there is an "unstable" solution if and only if $\vec r_1=0$, i.e. the force is applied at the center of mass. The solution is unstable in the same sense as a one-legged table.
  2. For $N=2$, there is an "unstable" solution if and only if the center of mass lies on the line connecting $\vec r_1$ and $\vec r_2$ (i.e. $\vec r_1$ and $\vec r_2$ are colinear with the center of mass). The solution is unstable in the same sense as a two-legged table.
  3. For $N=3$, there is a unique, stable solution as long as no two of the points $\vec r_1$, $\vec r_2$ and $\vec r_3$ are colinear with the center of mass. If you further require that all forces $F_i$ be non-negative, the center of mass must lie in the interior of a triangle defined by $\vec r_1$, $\vec r_2$ and $\vec r_3$ as its vertices.
  4. For $N\ge4$, except possibly in degenerate cases (where some pairs of "vertices" are colinear with the center of mass), there are infinitely many solutions (i.e. no unique solutions).

A four-legged table with each leg in contact with the ground doesn't actually need to be supported by equal forces applied at each leg. All that is required (besides the condition that the sum of the forces equal the weight) is that the forces on opposite legs be equal. So there are an infinite number of force distributions that will support the table.

Puk
  • 13,526
  • 1
  • 22
  • 42
  • Thank you Puk! This is something I was trying while following this video: https://www.youtube.com/watch?v=EzquIxEoHRE (I think it's similar at least). You've given me more to think about. I will mull on this and try to come up with a solution. Thank you! – ntgCleaner May 03 '22 at 14:33