Re: Barycentric to cartesian?
- From: Kaba <none@xxxxxxxx>
- Date: Mon, 21 Jul 2008 16:24:43 +0300
Ron Francis wrote:
When finding an intersection of a line and a triangle I find the point on
the plane and then determine if it is in the triangle.
I have been reading some stuff which id supposed to do it more efficiently,
but it leaves me with barycentric coordinates (t,u,v).
I haven't used these before and couldn't find any information on converting
back to cartesian.
Sorry if this is a stupid question, but is it possible?
If so, how can I do it?
Your choice of names for the ordinates suggests you are actually using
the Moller-Trumbore ray-triangle intersection algorithm. In that case,
(t, u, v) are not barycentric coordinates. The barycentric coordinates
are (u, v, 1 - (u + v)), while t is the parameter of the ray. You can
use either to get the point of intersection (t is along the ray, the
barycentric coordinates are along the triangle). Barycentric coordinates
are useful to interpolate values along the triangle, position being just
one example.
--
http://kaba.hilvi.org
.
- Follow-Ups:
- Re: Barycentric to cartesian?
- From: Ron Francis
- Re: Barycentric to cartesian?
- References:
- Barycentric to cartesian?
- From: Ron Francis
- Barycentric to cartesian?
- Prev by Date: Re: Barycentric to cartesian?
- Next by Date: ray-triangle edge intersection
- Previous by thread: Re: Barycentric to cartesian?
- Next by thread: Re: Barycentric to cartesian?
- Index(es):
Relevant Pages
|