D
D
destel2011-02-16 01:51:43
Mathematics
destel, 2011-02-16 01:51:43

Approximate calculation of air resistance in the box2d engine

I hope there are people here who know how to do it.
What is given: There is a body, which is a convex polygon. It moves at some speed and possibly rotates around the center of mass. Air resistance and/or lift must be calculated.

The calculation is needed for the box2d physics engine.
I decided to do this: we divide the surface (perimeter) of the body into segments, for each we calculate the resistance force and apply it to the body using the box2d functions.
In theory, if the partition is made small enough, then the result should be adequate.
For each segment, I calculated the instantaneous speed of its first point and the normal.
It is clear that the force will be proportional to the speed of the point (or the square of the speed), the length of the segment, and the cosine of the angle between the normal and the speed.
Actually my question is how to determine the direction of force. If anyone has experienced something similar, please help. I will be grateful for any help

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Eol, 2011-02-16
@destel

My instinct tells me that it is directed along the normal to the surface (in your case, a segment). But I'm not sure.

D
destel, 2011-02-16
@destel

seems to be true, at least with this algorithm the result is adequate

M
Maxim Vasiliev, 2011-02-20
@qmax

when you find a solution, write an article :)
it will be very interesting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question