Jump to content
  • Advertisement
Sign in to follow this  
mike74

barycentric analog

This topic is 4838 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You know how there's the area interpretation of barycentric coordinates? Is there a volume analog for finding the vertex weights of a point inside a tetrahedron? If so, I think you could find the set of points on a convex hull of some points pretty easily. You could just pick four random points and discard all of the points inside that tetrahedron. Keep doing this... mike http://www.coolgroups.com/forum

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
This is off the top of my head, but I think it's right...

Geometrically, the idea is you use the edges of the tetrahedron as axes, and work out a matrix to transform that to a coordinate system where the tetrahedron vertices become (0,0,0), (0,0,1), (0,1,0), and (1,0,0).

The way you do that is if your tetrahedron has verts A, B, C, and D, your edges will be (B-A) (C-A) and (D-A). So the inverse of the matrix you want (where the edges are column vectors) is:

[ (B-A) (C-A) (D-A) A ] = T*R*S

T*R*S means that this matrix is the result of a Scale, then Rotation, then Translation, so to invert, we do the corresponding anti-steps in the opposite order.

To anti-scale, you multiply by 1/S, where the S is the length of each edge. To anti-rotate, you transpose the 3x3 rotation part, and to anti-translate you apply the negative translation.

Share this post


Link to post
Share on other sites
Quote:
You know how there's the area interpretation of barycentric coordinates? Is there a volume analog for finding the vertex weights of a point inside a tetrahedron?

If so, I think you could find the set of points on a convex hull of some points pretty easily. You could just pick four random points and discard all of the points inside that tetrahedron. Keep doing this...
I'm not familiar with the AP's solution, but yes, barycentric coordinates work in any dimension. They can be thought of as the weighted average of a set of points, or a parameterization of a set of basis vectors.

I'm not sure about your convex hull idea, though. Once a point is found outside the initial tetrahedron it must be added to the hull. The hull is then no longer a tetrahedron and the barycentric approach won't be of any use. But perhaps I'm misunderstanding your suggestion...

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!