# Point of intersection inside 3D triangle?

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

## Recommended Posts

Lets say I have a triangle with V1(x,y,z), V2(x,y,z) and V3(x,y,z) and a point P(x,y) inside the triangle. How can I compute for P(z) if values of V1, V2, V3 and P(x,y) are known? I'm not good in math, please help. Thanks!

##### Share on other sites
Treat the triangle as a 2D triangle, each vertex of which has a value (the Z values from your original triangle). Then use linear interpolation to find the corresponding Z value of the target point.

##### Share on other sites
I'm sorry but I still don't get it. What is the exact formula for this?

##### Share on other sites
Quote:
 I'm sorry but I still don't get it. What is the exact formula for this?
If you want more references in addition to the one sneftel gave, google for 'barycentric coordinates', or 'parametric triangle'. The idea is to project the triangle into a plane - the xy plane in your case - and solve for the barycentric coordinates or parametric values. Then apply these to the vertex z components to get your interpolated z value. You should be able to find the formulas online using the above search terms.

##### Share on other sites
okay I got it, its Ax + By + Cz = D

thanks....

1. 1
2. 2
3. 3
Rutin
15
4. 4
5. 5

• 9
• 9
• 11
• 11
• 23
• ### Forum Statistics

• Total Topics
633679
• Total Posts
3013294
×