# mg.metric geometry – tetrahedral interpolation and integration along a segment

Let’s say we have a several tetrahedrons $$T_i$$ whose faces touch so that each face belong to two tetrahedrons. Each tetrahedron contain a value $$V_{i}$$.

Given a position $$P$$ inside the tetrahedron $$T_0$$, and neighboring tetrahedron are labeled $$T_1, T_2, T_3, T_4$$.

How to compute the value $$V(P)$$ such that its value is a linear interpolation between all $$V_i$$?

Following this, given a direction $$vec{d}$$ and the origin $$O$$ and a scalar $$t$$ such that $$P(t)=O+d*t$$, what is the equation giving the interpolated value along this segment $$V(t)$$, considering only the part where the segment is inside $$T_0$$?

I tried to use barycentric coordinates, and I think it confused me more than it helped.

What would be a simple explanation for solving such a problem?