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. #1
    dizolve
    Guest

    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. #2
    Registered User compjinx's Avatar
    Join Date
    Aug 2001
    Posts
    214
    What is this for?
    "The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
    Eric Porterfield.

  3. #3
    Refugee face_master's Avatar
    Join Date
    Aug 2001
    Posts
    2,052
    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. #4
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    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
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  5. #5
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,825
    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. #6
    Registered User dizolve's Avatar
    Join Date
    Dec 2002
    Posts
    68
    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. #7
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    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...
    Last edited by *ClownPimp*; 12-17-2002 at 09:24 AM.
    C Code. C Code Run. Run Code Run... Please!

    "Love is like a blackhole, you fall into it... then you get ripped apart"

  8. #8
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    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;
    PHP and XML
    Let's talk about SAX

  9. #9
    Senior Member joshdick's Avatar
    Join Date
    Nov 2002
    Location
    Phildelphia, PA
    Posts
    1,146
    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.
    FAQ

    "The computer programmer is a creator of universes for which he alone is responsible. Universes of virtually unlimited complexity can be created in the form of computer programs." -- Joseph Weizenbaum.

    "If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it." -- Richard Pattis.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ math equation
    By XodoX in forum C++ Programming
    Replies: 22
    Last Post: 03-01-2009, 11:02 PM
  2. Replies: 15
    Last Post: 11-04-2006, 03:06 AM
  3. Converting String to Math Equation
    By draggy in forum C++ Programming
    Replies: 5
    Last Post: 07-10-2005, 06:59 PM
  4. Math Equation Program (I can't find the problem with my program!)
    By masked_blueberr in forum C Programming
    Replies: 14
    Last Post: 07-06-2005, 11:53 AM
  5. IDEA: Equation solver
    By Magos in forum Contests Board
    Replies: 2
    Last Post: 01-07-2003, 10:46 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21