Lots of different ways to do this. One way would be the following: (This is off the top of my head so forgive mispellings of method names)
1. Let p1 and p2 be the end points 2. let length L = p1.distanceTo(p2); 3. Construct a cylinder from 0,0,0 to 0,L,0 4. Make a transform3d called T 5. Set the transform to look at p2 from p1 using T.lookAt(p1,new vector3f(0,1,0), p2) 6. now create a transform group TG and sets its transform to T 7. under the transform group put your cylinder. Dave Yazel http://www.magicosm.net -----Original Message----- From: Asaf Dafner [mailto:[EMAIL PROTECTED]] Sent: Tuesday, March 05, 2002 2:12 AM To: [EMAIL PROTECTED] Subject: Re: [JAVA3D] Rotations More specifically about rotations (or is it the math that i'm missing?): I want to position a cylinder by using a function that receives two (x,y,z) points, (so the cylinder is like a line stretching between these points). Can anyone please provide some pointers/link/source extracts that would help me? Thanks, Asaf. "���Լ�" wrote: > JeeGS> Hello...I am trying to obtain the same infomation as you are > trying .....Can I get the same source code that you obtain? > Thanks a lot... > > > > > > Hi all, > > I am rotating an object on the screen. It seems > > to be rotating in a circular path, instead of rotating > > on its own axis. > > > > In OpenGl, we can correct it by translating the object > > to the origin and then apply transformations, and > > again retranslate the object to its original place. > > > > Is this the way to do in Java3D. Can anyone give a > > sample code. > > > > Thanks, > > Sagar. > > > > __________________________________________________ > > Do You Yahoo!? > > Yahoo! Sports - sign up for Fantasy Baseball > > http://sports.yahoo.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". > > > > > > _ > __________________________________________________________________________ > �ѹ̸����� ���� �̸����� �������� [Image] (http://mail.hanmir.com/) �츮���� ���ϴ� ���ͳ� ����Ʈ �ѹ̸� (http://www.hanmir.com/) > > [Image] > =========================================================================== > 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". -- ------------------------------------------------- Asaf Dafner Short -but- Deep, Mainly Deep. Frontline PCB Solutions Phone : (972) 8-9322183 Ext. 148 Fax : (972) 8-9322186 email : [EMAIL PROTECTED] Je n'ai fait celle-ci plus longue que parce que je n'ai pas eu le loisir de la faire plus courte. - Pascal ==========================================================================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".
