RE: [Algorithms] Extracting a Matrix from a Tetrahedron (was: Preventing Verlet Rigid Bodies From Go
Brought to you by:
vexxed72
From: Tyson J. <twj...@sa...> - 2002-12-10 17:49:33
|
I don't see how either method would "bite" you, but I would probably just for my own mental sanity and debugging convenience define one of the points as "up" and another as "forward". I'd put the origin of the frame at the base of the tetrahedron opposite "up."*. From there construction is trivial**. But I'm doing extra work to get there and only so that I have a nice convenient local space. OTOH, nice convenient coordinate frames have saved me hours of debugging that I can then use to speed up really slow parts of the game. * Average the three bottom points ** up - base = up_vector, forward - base = forward_vector, up_vector X forward_vector = right_vector -----Original Message----- From: gda...@li... [mailto:gda...@li...] On Behalf Of Steve Ranck Sent: Tuesday, December 10, 2002 12:26 AM To: gda...@li... Subject: [Algorithms] Extracting a Matrix from a Tetrahedron (was: Preventing Verlet Rigid Bodies From Going Inside-Out) Hi Charles, This is another great question. I'm currently using only 3 of the points and completely ignoring the 4th. Though I'm getting pretty decent results, I wonder if it's going to bite me under certain circumstances. In fact, the method I use to extract the matrix is even worst. I implemented the most straightforward approach, where the line between the first two vertices is one of my axis, and the other two are derived via cross products. This seems like two of the points would have direct influence over the matrix generation, followed by the 3rd, and ignoring the 4th. The ideal solution would generate a matrix considering all four points. It seems there should be a way to determine the matrix by somehow "averaging" the 3 axis formed by the particles of a right tetrahedron. Or if we measured how far off two axis were (using dot product, for example) from each other and called that the error, maybe we could select a matrix whose 3 axis form a minimum error when summed together. I wonder what Jakobsen did. Steve > -----Original Message----- > From: gda...@li... > [mailto:gda...@li...] On > Behalf Of Charles Bloom > Sent: Monday, December 09, 2002 10:28 AM > To: gda...@li... > Subject: Re: [Algorithms] Preventing Verlet Rigid Bodies From > Going Inside-Out > > > > At 12:43 AM 12/9/2002 -0800, Steve Ranck wrote: > >The "Rigid Bodies" section speaks about using a tetrahedron > >configuration of 4 particles with distance constraints > between them to > >represent a rigid body. From the particle positions, a matrix can be > >extracted and the graphics geo (or whatever) can be oriented > by using > >that matrix. > > BTW how are people extracting a frame from a tetrahedron? > The problem is over-constrained, since you only need 3 points > to define a coordinate frame. > > ------------------------------------------------------- > Charles Bloom cb...@cb... http://www.cbloom.com > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > GDAlgorithms-list mailing list GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 > > ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ GDAlgorithms-list mailing list GDA...@li... https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list Archives: http://sourceforge.net/mailarchive/forum.php?forum_id=6188 |