I think I found it in link #2. Would it be these?
v = v - k * v
v = v - k * v - m * v2
With k being the drag coefficient?
Air Resistance
Yeah, try this
I removed the physics part of my engine atm, but i will try it as soon as possible too, cause i'm programming with 2d too
I removed the physics part of my engine atm, but i will try it as soon as possible too, cause i'm programming with 2d too
In the rigid body simulator I'm developpin', I use the following formula to compute the amount of force the fluid is applying on my rigidbody:
F = 0.5*C*p*A*v²
C -> coefficient of friction of the surface (I usually use something like 0.3)
p -> fluid density(air density is aproximatelly 1.29kg/m³)
A -> surface area in m²
v -> surface velocity in m/s²
This way you get the force in Newtons that the fluid resistance is applying on the surface. Since in my rigidbody simulator I use convex polyhedra objects, I compute the force that is being applied on each triangle of the object and then I just sum all them. It gives me good results. I'm satisfacted with them.
F = 0.5*C*p*A*v²
C -> coefficient of friction of the surface (I usually use something like 0.3)
p -> fluid density(air density is aproximatelly 1.29kg/m³)
A -> surface area in m²
v -> surface velocity in m/s²
This way you get the force in Newtons that the fluid resistance is applying on the surface. Since in my rigidbody simulator I use convex polyhedra objects, I compute the force that is being applied on each triangle of the object and then I just sum all them. It gives me good results. I'm satisfacted with them.
I still cant find the thread with terminal velocities discussion. It would be good to find it, cause there were suggestions for stable solver.
So earths air density is 1.29 kg/m3? Does that mean I have to make the constant 1.293 or just leave it at 1.29? Since I'm working in 2D, I'm not sure if I should make it squared instead of cubed.
heheh...
'kg/m³' its just the unit of the 'density'...it means you must use 1.29...for water for example, you'd use 1000 since the water density is 1000kg/m³
'kg/m³' its just the unit of the 'density'...it means you must use 1.29...for water for example, you'd use 1000 since the water density is 1000kg/m³
Ok, 1.29 it is. Since I'm not worried about friction too much in my case, I can just leave C out then? Which would be this now:
F = 0.5 * 1.29 * Surface_Area * Velocity²
F = 0.5 * 1.29 * Surface_Area * Velocity²
getting C out from the formula, you're assuming your object's surface has a coefficient of friction of 1.0. If you set C to 0.0, you'll get no friction meaning without friction, doesn't exist air resistance. You must put a value at there.
Drag is a force that is related to several things:
If you treat the drag D as just another force (using the equations from our discussion on jumping), then the (simplified) equation for drag force D is this:
D = C * A * V^2;
Where A is the cross-section area of the object
V is the velocity of the object
C is a tuning constant, which should be whatever looks best.
Implement it with your other forces so that
F = D + G + O;
Where G is gravity, and O is other stuff.
Then get your acceleration as usual.
Is this related to your jumping objects?
- The size of the object
- The speed of the object (squared)
- The thickness of whatever the object is travelling through
If you treat the drag D as just another force (using the equations from our discussion on jumping), then the (simplified) equation for drag force D is this:
D = C * A * V^2;
Where A is the cross-section area of the object
V is the velocity of the object
C is a tuning constant, which should be whatever looks best.
Implement it with your other forces so that
F = D + G + O;
Where G is gravity, and O is other stuff.
Then get your acceleration as usual.
Is this related to your jumping objects?
As for jumping, do you really need air resistance for jumping. If you make a character which jumps, then its an big effort for such a simple thing.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement