I'm working on an application for BeamNG where users enter the center of gravity and total weight of their physics structure, then the program will load in all the XYZ positions of the structure and weight each point individually in KG.
Does anybody have the math behind this? The program would load each point into an XYZ coordinate and would have the coordinate count, and it would also have the center of gravity in an XYZ coordinate.
I would try to do it like this:
CoG.x
CoG0.x
CoG0.x-Cog.x
sign)CoG0.x-Cog.x
magnitude