Well if they are really vectors then they are origin based, so all you
really need to preserve is the scale.  Take the scale of the second vector
and apply it to the normalized version of the first.  This will effectively
use the rotation of the first and the scale of the second.

Vector3d temp = new Vector3d(first);
temp.normalize();
temp.scale(second.length());
second.set(temp);

Dave Yazel

----- Original Message -----
From: Bob Dengle <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 07, 2001 1:40 AM
Subject: [JAVA3D] Rotating One Vector Into Another


Hi

I have two vector3ds. I want to rotate one so that it falls along the same
line as the other. Does anyone have any suggestions on how to do this? I
know how to compute the angle between the two vectors, but how do I go from
there to a rotation matrix? Thanks in advance.

B.D.
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

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

Reply via email to