PDA

View Full Version : Car: Torque curve

Angelo
30-05-2007, 03:31 PM
Hi, I've got the following question:

Has anyone got an idea for cars torque?

I mean I'd like to do it through a real torque curve.
But my question is how to do it... (not asking for code but for sketches...).

I was thinking and came up with this:

Give the torque curve a formula, I think if I take a look at the graph I think most cars just have a quadratic formula (or maybe a third dimensional).
So, to create a formula won't be that hard (I don't see problems in this one yet).
But how to go further?

I came up with this:

Every gear has each own curve, which mean its own formula, still no problem.
But how can I implement the formula?
Maybe by using RPM?
How the car accelerates is defined by the acceleration of rpm (correct me if I'm wrong).

By using the the formula I can say x = rpm.
y = acceleration speed.

And then there is the speed down (by releasing the driving button) this acceleration will be defined by a "- constantnumber * weightofthecar and some other car-related code".
The acceleration (or should I say de-acceleration) of the rpm will be something like:
Torquecurve * "- constantnumber * weightofthecar and some other car-related code.
So that when someone releases the driving button and pushing it again, the rpm will decrease and then increase.
And because rpm = x I can find the y = acceleration whenever I want...

My question is, will this be a good way to do this?
Is it reliable?

Or does anyone have any other ideas?
Ideas are always welcome,

Angelo.

JSoftware
30-05-2007, 03:52 PM

I think that one explains releations pretty well

Robert Kosek
30-05-2007, 03:54 PM
A quick suggestion. If you want to model car physics the 8th chapter of Physics for Game Programmers (ISBN: 159059472X) is absolutely chok of helpful information for you. And nowadays it's pretty cheap too.

However, here are some helpful formulae for you:

There is a minimum Torque[Engine] value per car, and it does tend to have a maximu too. The minimum is all you should concern yourself over.

Torque&#91;Engine&#93; = Torque&#91;Engine&#93;*RPM; // RPM is really the engine turnover rate, what we call revolutions per minute.

Ang_Vel = &#40;2 * Pi * RPM&#41; / 60; // This is the actual angular velocity in rad/s.

Power&#91;Engine&#93; = Torque&#91;Engine&#93; * Ang_Vel;

// Now we get into gears and the transmission...

Torque&#91;Wheels&#93; = Torque&#91;Engine&#93; * Gear_Ratio&#91;Current&#93; * Gear_Ratio&#91;Max&#93;;

That's about all I can give with my understanding. I'm sorry that I can't help you much more, but that's some of the basics for you.

Angelo
30-05-2007, 04:00 PM
Thanks for the replies.

I think I was at the right direction... I know how it works within the car and the physics but I'm not sure how to implement it into a game engine.
But I'll experiment with it...

*BTW: Why don't I create an automatic gearbox, its much easier then with those gears!!!*

Enough moaning, I'll fix it :P (within a year or two...)