Thanks Graeme.

In general this was the solution to my problem, but the
cylinders fail to draw unit vectors from (0,0,0) -> (0, length, 0)
which conicidentally is the normal that cylinders and your rotations
start at.

Hmmmmmmm....

-- John

> -----Original Message-----
> From: Discussion list for Java 3D API
> [mailto:[EMAIL PROTECTED]]On Behalf Of Graeme R. Foot
> Sent: Thursday, October 04, 2001 3:06 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JAVA3D] This doesn't work quite right...
>
>
> Have attached modified code...
> (look for // MOD GF for changes.)
>
> Main change, your angle calc was the difference between the two
> point vectors.
> This needed to change to be the angle between the cylinder axis
> and the new
> axis, (see the second attachment)  and subsequently the
> orthagonalAxis changed
> also.
>
> The second change was in the translation:
>   originVec.sub(diffVec);
> changed to:
>   originVec.add(diffVec);
>
> The third change was to put the rotation transform after the translation
> transform.
>
> Hope this helps,
> G.

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