Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MButchers

u,v to point on triangle

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

Hello there, i''ve got the UV barycentric coordinates for my ray,triangle intersection. How can i convert this into a 3d vertex of the exact intersection point. Many thanks Mark.

Share this post


Link to post
Share on other sites
Advertisement
Or how do I calculate the plane equation for the triangle

(ABCD) I know how to get ABC = tri normal, but
how do I calculate D?

I Have searched on google and cannot find anything of any
help. ( though it returns plenty of results ).

Many thanks

Mark.

Share this post


Link to post
Share on other sites
So you want a parametric equation for the plane that contains your tri?
Why should you need a fourth point? A plane is defined by 3 points.
Let a, b, c be the vectors that point from the origin to the points A, B, C
Let x be a vector to any point on your plane
Let vector f = b - a
and g = c - a
And h and i be two real numbers (float)
Then the surface containing the triangle ABC is:

x = a + h*f + i*g



Yesterday we still stood at the verge of the abyss,
today we''re a step onward!

Share this post


Link to post
Share on other sites
Vaporisator,

thanks for the post,
the reason I have plane = (ABCD) is D is the distance from
the origin, I know wether the Ray intersects the triangle,
I just want to know the exact point of the intersection (x,y,z)
To do this I was going to use the function I have to get the
point of intersection between a ray and a plane which reqires
ABCD.

Mark.

Share this post


Link to post
Share on other sites
Ill just try this

D := -(A * p1[0] + B * p1[1] + c * p1[2]);

Many thanks

Mark.

Edited by - MButchers on December 10, 2001 11:40:22 AM

Share this post


Link to post
Share on other sites

  • 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!