Re: [Plib-users] Problems using sgIsectPlanePlane(), point is always at 0, 0, 0
Brought to you by:
sjbaker
From: Satz K. <sat...@go...> - 2011-09-21 08:54:21
|
Thanks, I got it working :-) On 9/20/11, Fay, John F Dr CTR USAF AFMC AAC/XRS <joh...@eg...> wrote: > Elmi, > > Hello and welcome to the PLIB community. > > I think the problem is that you are using relative vectors when > making your planes. If you say "sgMakePlane ( plane1, a1, b1, c1 )" and > "sgMakePlane ( plane2, a2, b2, c2 )" you will get nonzero values for > your "point". The three vectors in "sgMakePlane" are the vectors from > the origin to the three points that define the plane. > > John F. Fay > Technical Fellow, Modeling and Simulation > Jacobs Technology / TEAS Group > P.O. Box 1935, Eglin AFB, FL 32542-5000 > 850-883-3496 > > > -----Original Message----- > From: Satz Klauer [mailto:sat...@go...] > Sent: Tuesday, September 20, 2011 2:16 AM > To: pli...@li... > Subject: [Plib-users] Problems using sgIsectPlanePlane(),point is always > at 0, 0, 0 > > Hi, > > I want to find the intersection line out of two planes but fail > miserably. That's what I'm doing: > > - I start with two triangles a1,b1,c1 and a2,b2,c2 that describe my > planes and consist of three coordinates x,y and z for every corner of > it > - out of their corner coordinates x,y and z I calculate 3D vectors > sgVec3 va1,vb1,vc1 by substracting the coordinate values b1-a1, c1-b1, > a1-c1 and normalizing the result; the same is done for the second > triangle's coordinates > - then I call > > sgMakePlane (plane1,va1,vb1,vc1); > sgMakePlane (plane2,va2,vb2,vc2); > ret=sgIsectPlanePlane (point,dir,plane1,plane2 ); > > But here the result is unusable and nearly every time the same. > "point" always contains _very_ small values so that after rounding to > 6 decimal places the coordinates of it are 0,0,0. > > What am I doing wrong here? > > Elmi > > ------------------------------------------------------------------------ > ------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2dcopy1 > _______________________________________________ > plib-users mailing list > pli...@li... > https://lists.sourceforge.net/lists/listinfo/plib-users > |