POV-Ray : Newsgroups : povray.animations : Animation of a tail : Re: Animation of a tail Server Time
6 Oct 2024 11:15:15 EDT (-0400)
  Re: Animation of a tail  
From: Tom Bates
Date: 11 Feb 2002 12:28:03
Message: <3c67ff23@news.povray.org>
"Greg M. Johnson" <gregj:-)565### [at] aolcom> wrote in message
news:3c67ecef$1@news.povray.org...
> "Apache" <apa### [at] yahoocom> wrote in message
> news:3c67c3f3@news.povray.org...
> > I'm afraid that using IK (Inverse Kinematics) will be the best way of
> doing
> > that.
> >
>
> Really?  IK surely makes the most sense for hip-knee-foot, but does it
> really for hip-middle_tail-middle_tail-middle_tail-end_of_tail?
>
> I think a tail flows via pure FK.  The question is in choosing the right
> time sequence for the wag.
>
>

I used a progagating sine wave for my dragon's tail:

  #declare animlength = 32.0;  // length of the scene in seconds
  #declare cyclelength = 2.0;  // period of one tail-wag

  #declare aclock = clock*animlength;  // aclock ranges from 0 to 32

  // cycleclock ranges from 0 to 1 over cyclelength
  #declare cycleclock  = (aclock/cyclelength - int(aclock/cyclelength));

  #macro tz(p)
    (0.2*p * cos((p/24-cycleclock)*2*pi))  // Side to Side wagging
  #end

  // Tail Segment Rotation = < curl up, twist clockwise, curl left>
  #declare tailpos = array[tailsegments] {
                     <  0,  0, tz(36)>, // rotation of tail segment 1
                     <  0,  0, tz(35)>, // rotation of tail segment 2
                     <  0,  0, tz(34)>, // rotation of tail segment 3
                     // ...
                     <  0,  0, tz( 3)>, // rotation of tail segment 34
                     <  0,  0, tz( 2)>, // rotation of tail segment 35
                     <  0,  0, tz( 1)>} // rotation of tail segment 36


This provides a nice even wag where the rotation of each segment is relative to the
segment it is attached to.

If, however, I wanted the tail to flip a light-switch, I would try to figure out an
IK way to do it.
Rune has an IK Neck include file which I've downloaded but not looked at yet.
http://rsj.mobilixnet.dk/3d/include/include.html


Thomas Bates

--
#macro T(B)#local m=mod(B,8);#local B=floor(B/8);m#end#local C=126981491245202;#
local D=115694168992822;sphere_sweep{b_spline 16#local i=0;#while(i<16)<T(C)-4,T
(D)-4,10-i/10>.1#local i=i+1;#end pigment{rgb 1}}light_source{-10,1} //Tom Bates


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.