# A math equation

This is a discussion on A math equation within the A Brief History of Cprogramming.com forums, part of the Community Boards category; I need help creating a math equation. "It will take me x energy to do one pushup at x gravity ...

1. ## A math equation

I need help creating a math equation.

"It will take me x energy to do one pushup at x gravity if I am x strong."

Where gravity and strength are supplied and energy needs to be figured.

It needs to work atleast for gravity 1-1000 and strength 1-1000000000, all combinations.

I know I'm pretty much asking for someone to create this for me, and great thanks to anyone that does. I've been experimenting for 4 hours now and can't even seem to get close.

2. What is this for?

3. I've been experimenting for 4 hours now and can't even seem to get close.
Lol sure, mate. Ok show us these things that you've 'tried'. We dont like to plain out give people answers, so I'm sure somebody would be glad to help you as long as they know that you are putting effort into this.

4. considering strength has nothing to do with weight (at least not strictly), it will take you the same amount of enery to push yourself up if you were as strong as, say, Ron Coleman (Mr Olympia, not sure if current though) compared to how strong you are now, as long as your weight is constant

5. Plus, there are no units of strength...

(I guess that's not a problem if you can find a way to equate calories and g's)

6. It's actually for a game I'm creating. I don't plan on it having any real relation to physics.

The only equation I've gotten so far that even comes close to what I want is:

E = ((G * (G / S)) * 1000)

This is by pure luck. I've just been doing random things with division and multiplication hoping to get lucky. This won't work for 1000G and 100000000000S though, and I'm really not as understanding with math to see how to modify it so that it does.

7. The energy necessary to lift yourself up is the energy (Work) necessary to overcome the force of gravity.

W = PE_f - PE_i = mgh

where m is your mass, g is the force of gravity (about 9.81 meters per sec, 32.2 ft per sec) and h is the height you travel.

Of course you have to take into consideration the fact that your not lifting your total body weight and the force along the path you travel varies, which complicates things exponentially...

8. If i remember correctly, doing push-ups in the proper form, you lift about 70% of your body mass....ie if you weigh 165 pounds (like me) then you lift:
Code:
```int weight=165;
int pushupWeight=weight*.7;```

9. Originally posted by dizolve
It's actually for a game I'm creating. I don't plan on it having any real relation to physics.
Dude, if it's for a game, just code in whatever makes you feel good. If you're going to have monsters or aliens or robots beating the crap out of each other, don't worry about getting your calculations correct. Just try to get close to something that seems plausible and makes the game simple enough for the player to win, but challenging enough to make it a good game.