…and a digital brain freeze.

Center of Gravity Calculation / Calculator

Filed under: Help — Tags: , , , — Bryan on Mar 31st, 2009 @ 7:11 pm

So I’m doing homework, and this center of gravity thing is pretty cool. In Location Strategy they use it to find the best location for stores and such on an X-Y plane with points that have certain weights or populations. “Well that’s neat,” I thought to myself. “I’ll make a little calculator using AJAX and PHP.” Because I really have nothing better to do.

It’s a pretty simple center of gravity calculator, just put in the weights first, seperated by comma’s, then the X coordinates and finally the Y coordinates. You should have the same number of each, if not, well, it’s just wrong. You should get two numbers back, these are the (X,Y) coordinates of the perfect center of gravity.

Enjoy my fancy “Center of Gravity Calculator” that I wasted 25 minutes minutes creating.

Enter weights here:

Enter X coordinates here:

Enter Y coordinates here:

8 Comments »
  1. great little tool. saved me re-learning the calcs for a quick rough idea of something. thx m8

    Comment by eric — August 4, 2009 @ 2:10 pm
  2. Thanks a lot

    Comment by Per Christensen — August 12, 2009 @ 4:00 am
  3. Ok Brian. You are most definitely several magnitudes smarter than I am. I have to ask you a follow up question to this concept of c.g.

    I have a homework problem where there is a square and there are four weights hanging from all 4 corners of the square. The weights are (if you are looking at the square in a x,y plane- 1 (at origin), 4 (upper left quadrant), 3 (upper right), and 2 (lower right). The scale on the y axis is from 0 to 2 and the scale on the x axis is from 0 to 2. Where is the center of gravity. Could you help with this and kinda say how you did it. I need your super mathematical powers. If you help you will be elevated to rock star status (and I don’t give this designation out lightly). Oh, and I need it ASAP!

    Comment by Kris Brown — October 5, 2009 @ 2:16 pm
  4. Kris, try entering these in:

    w:1,4,3,2
    x:0,0,2,2
    y:0,2,2,0

    Just think in terms of x,y point and weights. At the origin (0,0) with a weight 1. Top left (0,2) is a weight 4. Etc.

    Comment by Bryan — October 7, 2009 @ 9:36 am
  5. Where is this calculator? I dont see where i can use it.
    i am trying to find the center of gravity of 4 weights placed along the y-axis

    1. 3 kg @ 9.5 meters
    2. 2 kg @ 6.4 meters
    3. 2.5 kg @ the origin
    4. 4 kg @ -.5 meters

    Thank you very much ahead of time

    Comment by Mladen — October 14, 2009 @ 9:15 pm
  6. Great tool!

    Comment by Madison — December 3, 2009 @ 10:14 am
  7. I use a program called Express CG – located @ expresseng.com\software

    Comment by William — January 19, 2010 @ 4:24 pm
  8. Brian,
    Good job, now, how can this be used to calculate COG of an athlete?
    Jose

    Comment by Jose — February 1, 2010 @ 8:13 am
Leave a comment

All articles are licensed under a Attribution-Noncommercial-Share Alike 3.0 Unported License. All files/themes are released under the GPL License where applicable. © 2010 Bryan Helmig Hosted on Webfaction.