Skip to main content
GameDev.net gamedev.net
🔒 Locked

Friction

Started by LilBudyWizer Jan 28, 2003 at 12:50 AM 9 replies 650+ views
Original Post
LilBudyWizer
LilBudyWizer
Is this a reasonable way to simulate friction? CA=(1-CV/MV)*MA where MA is maximum acceleration, CV is the current velocity, MV is the maximum velocity and CA is the current acceleration. I''m just looking for reasonable, not accurate.
Keys to success: Ability, ambition and opportunity.
Zipster
Zipster
It''s hard to say if it''s reasonable, because it depends on whether or not it "looks good" for what you''re using it for. I personally wouldn''t have a problem with it, it makes intuitive sense - I like intuitive sense
johnb
johnb
No. In your formula the friction depends on speed. In real situations it doesn''t but is generally constant for a moving body, while for a stationary body it equals whatver force is needed to stop the body slipping, up to a limit.

It''s not obvious what you are trying to do: there must be some other force on your body as even when the velocity is zero you have acceleration, so it looks like you are trying to model something more complex than just friction. Can you describe what you are trying to simulate in more detail ?
John BlackburneProgrammer, The Pitbull Syndicate
Zipster
Zipster
I was always under the impression that friction varied with speed, usually increasing as speed increased. It might not be linear, and in that case the formula could be adjusted.
TerranFury
TerranFury
Although air friction increases at high speeds, my physics book tells me that the force of friction between surfaces depends only on the force pushing them together and the coefficient of friction for that pair of materials. I believe I've read at railgun websites, though (they're real! But very unlike anything you've seen in Quake), that at very high velocities friction decreases with speed.

In general, though, stick to the formula from my physics book: Ff = uFn

[edited by - TerranFury on January 31, 2003 4:56:53 PM]
LilBudyWizer
LilBudyWizer
So like riding a bicycle into the wind would be no differant than riding with the wind?
Keys to success: Ability, ambition and opportunity.
CrazedGenius
CrazedGenius
When you ride a bicycle with the wind, the wind contributes some amount of force in your direction. When you are against the wind, the wind is against you. Both are caused by air molecules smacking into you.

If you are accelerating through still air, it''s the same as having a stronger and stronger wind in your face. Basically, more little collisions per second as you move relative to the air.

In your original question, what type of friction were you hoping to model?


Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces"
NickB
NickB
Okay, I''m guessing that you''re refering to fluid induced drag; from my fluids notes (for a cylinder):

Fd = Cd * 0.5 * rho * U * abs(U) * A

where:

Cd = Coefficient of drag; empirical, try search the web for coefficient of drag...you''ll probably find a table of typical values somewhere

rho = density of fluid you''re moving thorugh

U = velocity (it''s not squared because direction must be taken into account)

A = frontal area

basically drag is actually proportional to A * U^2

If you''re refering to ground induced drag whilst sliding, it''s usually taken to be:

F = mu * R

where:

R is the force into the ground due to the weight of the object

mu is a friction coefficient.
LilBudyWizer
LilBudyWizer
Well, originally I was looking for something to dampen oscillations. Basically I have a grid of particles forming a height field. I use a convolution matrix to basically average the heights of the adjacent particles. How far the particle is from the average determines its acceleration. So really what I posted above doesn''t apply. The only dampening I get now is from particles that can''t oscillate which is mainly the edges. Well, actually past the edges, i.e. anything off the grid is assumed zero. A terminal velocity helps keep extreme amplitudes from happening, but doesn''t otherwise dampen the oscillations. With reflections and multiple generators it is just too complex to use an absolute time for calculating the position of a particle.
Keys to success: Ability, ambition and opportunity.
Bagel Man
Bagel Man
When I want quick and easy dampening I just go CV*=0.99 (or whatever number works)
CrazedGenius
CrazedGenius
I still don''t entirely understand what you want to do, but dampening in the sense of spring/damper systems is given as the dampening value * the velocity.

One of many sites that can shed more light on this:
http://mathinsite.bmth.ac.uk/applet/msd/msd.html

(look up spring/damper systems. In a spring simulation, most apps use numerical integration. With simple 1D motion, the inverse laplace transform will give you a tidy equation based on time, but I don''t know if this applies to your problem)

Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces"

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.