Archived

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

MButchers

u,v to point on triangle

Recommended Posts

MButchers    123
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
MButchers    123
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
Vaporisator    122
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
MButchers    123
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