I've been experimenting with animating a swarm of T's based on a trig
function, and most of the time it looks okay but sometimes the trailing T
jerks horribly, and sometimes the whole lot do.  Is this likely to be just
because I'm not using behaviours to control the animation, or might
something else entirely be going on?  I've attached the source code, which
is pretty simple, in case anyone wants to look at it.  The animation is
just being done in a run() method, as follows:

  public void run(){
        float phase=0;
        while (animThread != null){
            int index = 0;
            int ltLength=leftTeamTransform.size();
            int rtLength=rightTeamTransform.size();
            while (index<ltLength){
                Transform3D thisTransform3D=new Transform3D();
                        thisTransform3D.setTranslation(new
Vector3f(2f+2*(float)Math.sin(phase+(double)index/2),2*(float)Math.cos(phase
+(double)index/2)-1f,-8f));
                        thisTransform3D.setRotation(new
Quat4f(-5f,(float)Math.sin((double)index/4+phase/2)*10,-2.3f,1f));
                        TransformGroup
thisTransfromGroup=(TransformGroup)leftTeamTransform.elementAt(index);
                        thisTransfromGroup.setTransform(thisTransform3D);
                        index++;
                }
                phase+=0.05;
                try {
        animThread.sleep(20);
        } catch (InterruptedException e){        }
        }


Cheers

 - Fergus.

http://fergusmurray.members.beeb.net/
See irons dance!  Wonder at the mysteries of the animated curlicue fractal!
 And so on.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to