Hi,

If you must move the hand FROM a XYZ origin position
TO a X'Y'Z' target position you need a Inverse
Kinematics (IK) solver to calculate the shoulder &
elbow angles. The in-between angles can be
interpolated, or run the solver each frame elapse
using a small step for hand translation. This is hard
work anyway (for 10 days, uh! ...).

But if you already know the initial and target
shoulder and elbow angles, just interpolate them using
quaternions. This is Forward Kinematics (FK).
The quaternion interpolation is pretty easy as below:

Quat4f myQuat = Quat4f.interpolate(Quat4f origin,
Quat4f target,float alpha);

There are some examples to convert Euler XYZ to
Quaternion available. Below goes a example:

There are a very simple example for arm manipulation
in the links below:
http://web3dbooks.com/java3d/jumpstart/Java3DExplorer.html
http://web3dbooks.com/java3d/jumpstart/Human.html

There is a nice example (3D but not Java3D) example
here. Its possible to teste both FK or IK :
http://mediatheek.thinkquest.nl/~ll106/Interactions/robosim.java/NetscapeVersion/Robohome.html

This is all help I can give.
God Bless you.
Alessandro

/*
 public final Quat4f createQuaternionFromAxisAndAngle(
float x, float y, float z, float angle )
{
   float sin_a = (float) Math.sin( angle * 0.5f );
   float cos_a = (float) Math.cos( angle * 0.5f );

   x = (float) (x * sin_a);
   y = (float) (y * sin_a);
   z = (float) (z * sin_a);
   float w = (float) cos_a;

   return new Quat4f(x,y,z,w);
 }

 // a ser implementado
 public Vector3f createEulerfromQuat(Quat4f quat)
 {

   return new Vector3f();
 }

private final Quat4f createQuaternionFromEuler( float
angleX, float angleY, float angleZ )
{
 //simply call createQuaternionFromAxisAndAngle for
each axis
 //and multiply the results
 Quat4f qx = createQuaternionFromAxisAndAngle(
1f,0f,0f, angleX );
 Quat4f qy = createQuaternionFromAxisAndAngle(
0f,1f,0f, angleY );
 Quat4f qz = createQuaternionFromAxisAndAngle(
0f,0f,1f, angleZ );

 //qx = qx * qy
 qx.mul( qy );

 //qx = qx * qz
 qx.mul( qz );

 return qx;
}



 --- geoffrey butterworth <[EMAIL PROTECTED]>
escreveu: > yo robot arm simulation.
>
>   here is afile that does it with vrml.. i know its
> not java3d. but i am working on getting it sorted.
> mybe this is all you need if you just want to win
> friends and influence your unlce i mean.
>   as far as i am concerned. there is a whole lot of
> work to get this converted to java3d, but if if you
> are interested i am too.
>   everyone else. i am just using this as an
> excersise to put a url in a email..
>  http://polishedirene.ntlworld.com/crane.wrl
>
>   ps.. why do i not see any questions about the
> paricle emitter?
>
>  geoffrey.
>
>   ----- Original Message -----
>   From: Brian McCormick
>   To: [EMAIL PROTECTED]
>   Sent: Monday, May 24, 2004 2:32 PM
>   Subject: Re: [JAVA3D] ....robot arm simulation
>
>
>   I think you said it best.  You have to calculate
> all the mathematical thing by your self.  When you
> have a specific Java3D question then I'm sure people
> will be more willing to help you.  To the extent of
> my Java3D knowledge, there isn't anything like you
> describe to do your thesis for you.  There are tools
> that can help however.
>     -----Original Message-----
>     From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED] Behalf Of
> Alp Yilancioglu
>     Sent: Monday, May 24, 2004 6:53 AM
>     To: [EMAIL PROTECTED]
>     Subject: [JAVA3D] ....robot arm simulation
>
>
>     thank you for replying my message.
>
>
>
>     I have lots of problem with this thesis project,
>  I need your help , like i have to rotate an arm by
> the angles given from the user as an input to a
> destination.
>
>     I have to calculate all the mathematical thing
> by my self.  Waiting for your answers.. thank you..
>
>
>
>
>
>
>
>
>
>
>
>
>
>       ---OLD MESSAGE---
>     From: Alp Yilancioglu
> [mailto:[EMAIL PROTECTED]
>     Sent: 24 Mayýs 2004 Pazartesi 04:11
>     To: '[EMAIL PROTECTED]'
>     Subject: robot arm simulation
>
>
>
>
>
>     Need Help!  This is my thesis project for the
> university and I have got only 10 days to finish
> this project. I need help because I don't know The
> java3d package methods.
>
>     I am making a robot arm simulation.
>
>     I wanted the user to give the coordinates as an
> input and the arm will go to the given coordinate
>
>     Joint- How can I make joint/ link between
> objects?
>
>     How can I make a hierarchical structure?
>
>     Which classes should I use ?
>
>
>
>     Please someone help.
>
>
>
>
>
===========================================================================
> 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".
>
>
===========================================================================
> 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".
>
>
===========================================================================
> 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".
>

______________________________________________________________________

Yahoo! Messenger - Fale com seus amigos online. Instale agora!
http://br.download.yahoo.com/messenger/

===========================================================================
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