Fish physics

Please don't post Bullet support questions here, use the above forums instead.
Post Reply
Numsgil
Posts: 38
Joined: Wed May 14, 2008 5:58 am

Fish physics

Post by Numsgil »

My goal is to create a little program where users can put various bits (rigid bodies, joints, and some motors) together to create a machine that is simulated more or less correctly. Part of this goal is allowing a user to build something that can swim using drag forces like a fish.

this is quite literally the only useful source I've been able to find. And it's a bit hand-wavy in its explanation. What I'm presently thinking is something like a chain of, say, 5 links, where each link is a rectangle. Motors would "crinkle" the tail of the chain to form a zig-zag, then "crinkle" it in the other direction. The net result would (hopefully) be some forward momentum. Something like this:

Code: Select all

start:    "crinkle" one way:   "crinkle" the other way:
     |                |                            |
     |                |                            |
     |                \                            /
     |                /                            \
     |                \                            /
No physics engine that I'm aware of implements fluid drag (please tell me if there is one), so that's my first step. To keep things simple, I'm limiting this to viscous drag using the approximation viscous drag equation Drag Force = -bv, since it's relatively easy to solve analytically for an equation of motion. I'm also planning to take in to account the added mass effect.

The motors that cause the "crinkling" need to keep track of the energy they take to move (I'm thinking of grading the user based on distance traveled per unit energy), and probably have some maximum force they're allowed to exert. I'm familiar with the theory of how this works, but I've never actually implemented motors before, so I'm not entirely sure how it would work.

So I think I have all the pieces to simulate this, but I'm having a hard time putting them all together. Consider a single rectangular rigid body spinning in a fluid about its geometric center. Should drag cause any linear motion, or will it just act as a dampening effect on the body's rotational inertia? The drag forces on one end of the spinning body will point in the opposite direction to the drag forces on the opposite end of the body, so I need a way of taking that in to account in the final equation.

Another test case would be a long rectangle moving along one of its surface normals. The drag force wouldn't cause any torque at all, and would instead only serve to slow the body's motion.

The drag constant "b" depends on the cross-sectional area of the body as it travels through the liquid, so it sounds like I need to run an integral along the length of body, but I have no idea what such an integral would look like or how it would work. The final product should allow me to express the rotation, angular velocity, position, and velocity of each of the links in the fish chain as an analytic equation.

So I guess I'm just having a hard time getting started. Any advice anyone could offer would be greatly appreciated.
Oscar Civit Flores
Posts: 19
Joined: Fri Jan 20, 2006 2:24 pm
Location: Barcelona

Re: Fish physics

Post by Oscar Civit Flores »

Some years ago I came across a paper by Demetri Terzopoulos that help you:

http://portal.acm.org/citation.cfm?id=2 ... N=39435710

However, I doesn't seem to be freely available on the web, so I'm afraid you'll need an ACM subscription to get it. Most universities have full or limited access to the ACM resources, as well as printed copies of the Proceedings, that would be a cheap way to obtain it.

I remember there was also a paper on bird's flight dynamics from the same author that dealt with drag and might also be useful.

Oscar
poumpa
Posts: 1
Joined: Sun Feb 03, 2008 11:50 am

Re: Fish physics

Post by poumpa »

You can find papers by Terzopoulos in his homepage

http://www.cs.ucla.edu/~dt/
Numsgil
Posts: 38
Joined: Wed May 14, 2008 5:58 am

Re: Fish physics

Post by Numsgil »

Ah, thanks guys. You know I think I actually flipped through that ALife journal once a long time ago. Looks like I should have spent more time on it :P
Post Reply