Jump to content
  • Advertisement
Sign in to follow this  
gohkgohk

barycentric coordinates on Triangle

This topic is 3723 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

i used Moller Trumbore code to find the interestion between a ray and a point. But source code pass back the barycentric coordinates on Triangle (u,v) how can i change it back to real coordinates?

Share this post


Link to post
Share on other sites
Advertisement
At the end of the algorithm you have a t value. Take your ray origin, add it to t times the direction and you have your intersection point (p = o + t.d).

Alternatively, you can multiple the two edges used in the intersection by u and v respectively. Then this to the point they are relative two (p = v1 + e1.u + e2.v).

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!