1
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ what does it mean when you say that a tetrahedron "contains" a value? $\endgroup$ Commented May 25, 2020 at 20:18
  • $\begingroup$ Let's say in another way that a value is given to each of them as input data. It can be something like density for instance $\endgroup$
    – Patafikss
    Commented May 25, 2020 at 23:08
  • $\begingroup$ If you also have some bounary conditions you could try to find valus for the vertices s.t. for each tetrahedron its value is equal to the average of the values of its vertices. $\endgroup$
    – user35593
    Commented May 26, 2020 at 8:30

1 Answer 1

1
$\begingroup$

One common method is to assign values to the vertices of your central tetrahedron $T$, and then use Barycentric coordinates to interpolate from the vertices of $T$ to any point $p \in T$. The link shows how to convert between the coordinates of $p$ to its barycentric coordinates $\lambda_1,\lambda_2,\lambda_3,\lambda_4$. Then use those $\lambda$'s to form a weighted version of the values at the corners to $T$ to the value at $p$.

To use this approach, you need values at the vertices of $T$. I assume when you say that each tetrahedron $T_i$ "contains a value" $v_i$, you mean that $v_i$ is somehow appropriate throughout $T_i$. Then it makes sense to assign to a vertex $u$ of $T$ the average of the values $v_i$ for the three tetrahedra incident to $u$, and the value of your central tetrahedron $T$. To make this calculation less of a heuristic would require explicit criteria the interpolation is to achieve.

So:

  • Compute values for the four corners of $T$.

  • Compute the barycentric coordinates $\lambda_i$ for $p$. (Requires inverting a $3 \times 3$ matrix.)

  • Use the $\lambda$'s to weight the vertex values to an appropriate value for $p \in T$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .