Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 7 of 7

Thread: sperm, snake, worm movements

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2004
    Posts
    4

    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?
    freak

  2. #2
    Junior Member Regular Contributor
    Join Date
    Jan 2004
    Location
    Los Angeles, CA, USA
    Posts
    219

    Re: sperm, snake, worm movements

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

  3. #3
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,946

    Re: sperm, snake, worm movements

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

    For example:

    Code :
    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).]

  4. #4
    Member Regular Contributor
    Join Date
    Nov 2000
    Posts
    370

    Re: sperm, snake, worm movements

    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?

  5. #5
    Intern Contributor
    Join Date
    Jan 2004
    Posts
    69

    Re: sperm, snake, worm movements

    Originally posted by Elixer:
    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?
    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.

  6. #6
    Senior Member OpenGL Guru knackered's Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    2,833

    Re: sperm, snake, worm movements

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

  7. #7
    Advanced Member Frequent Contributor
    Join Date
    Oct 2000
    Location
    Belgium
    Posts
    807

    Re: sperm, snake, worm movements

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

    -- Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •