#### Archived

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

# 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.

## 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 on other sites
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 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 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 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

1. 1
Rutin
24
2. 2
JoeJ
20
3. 3
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631749
• Total Posts
3002046
×