sperm, snake, worm movements

Hi guys… i wonder if i can have some feedback on this topic.

Im doing a project on a movement of sperm (or any snake like movements). The idea is to simulate a movement of the tail of the sperm.

SO, i got around to making the head of the sperm and the body(tail). now i’m stuck (or idealess) in making the tail move in ‘waving’ like movements.

any ideas?

I’d parameterize it with a something based on a sine function. If you want something quantitative, though, you know better than I.

Apply a sine wave, multiply the amplitude by the distance from the body and change the phase over time.

For example:

dynamic_model_y = fixed_model_y + sin( fixed_model_x * frequency_factor + elapsed_time * speed) * fixed_model_x * amplitude_scale;

This kinda assumes that the head is near the origin. If you put the base of the tail at the origin and apply the sin to the head also it will probably wiggle convincingly in the opposite direction from the current tail beat.

Speed implicitly includes the a scale factor for elapsed time. There are a few more terms you’d probably want to rationalize.

P.S. you may need to use -elapsed_time, depending on the axis this has been modeled along, you may also need to switch x & y or even use z for the same obvious reasons.

[This message has been edited by dorbie (edited 02-23-2004).]

Dorbie, why was this topic not locked or moved? I don’t seen anything even remotely related to openGL in the post.

Or did you hand in your moderator duties?

Originally posted by Elixer:
[b]Dorbie, why was this topic not locked or moved? I don’t seen anything even remotely related to openGL in the post.

Or did you hand in your moderator duties?
[/b]

but at least it can still be considered more or less advanced coding related to graphics with the slim chance of opengls evaluators being of any help. so its by for not as off-topic as some other recent posts… including yours and mine ,-)

and i guess the above methods should look a lot more convincing than erratic and random tail-slashing (which could then easily be dont with a few bones and applying halfway random rotations. considing that snakes and the like usually seem to make pretty regular and clean movements.

You lot asked for a moderator, and this is what you must put up with…the whims of overgrown prefects.

Will it help you sleep at night if I move the thread to the math & algorithms forum?

– Tom