Computing the shortest path between opposite vertices in two adjacent triangles

188 Views Asked by At

consider the following situation but in 3D space.

enter image description here

In 3D the situation above would be two triangles "folded". The question I have is what's the length of the shortest curve joining $v$ and $w$, I've tried to formalize the problem as follow

$$ l(\alpha) = \lVert x + \alpha(y - x) - v \rVert + \lVert x + \alpha(y - x) - w \rVert $$

and I try minimizing the above by varying $0 \leq \alpha \leq 1$.

Differentiating and setting the result equal to $0$ yields

$$ \frac{dl}{d\alpha} = \left(\frac{x + \alpha(y - x) - v}{\lVert x + \alpha(y - x) - v \rVert} + \frac{x + \alpha(y - x) - w}{\lVert x + \alpha(y - x) - w \rVert}\right)^T(y-x) = 0 $$

and I later solve for $\alpha$. The thing about the equation above is that I can't find a simple way to isolate $\alpha$, is there a simple way to define the problem? or maybe an easy way to solve what I've already set up in closed form? (I think what I want is the length of the geodesic joining $v$ and $w$).

2

There are 2 best solutions below

5
On

If you are asking about the shortest curve which lies on the surface of the triangles, then you should just unfold them on the plane, draw the straight line from $v$ to $w$ and then fold back again.

0
On

You’re already most of the way to a solution. Distribute the dot product to get a sum of two terms, move one of them to the other side of equal sign, cross multiply to eliminate the denominators (we know they can’t be zero) and square to get a cubic equation in $\alpha$. If you’re lucky, it will factor nicely, but I don’t expect that to be the case.


There’s a fairly straightforward geometric construction that allows you to compute the length of this shortest path directly.

Unfolded triangles

Let $v'$ be the foot of the altitude from $v$ and $w'$ the foot of the altitude from $w$. These points are the orthogonal projections of $v$ and $w$, respectively, onto the line $xy$. Extend the segment $vv'$ toward $w$ to form the right triangle $\triangle{vqw}$. We then have by the Pythagorean theorem $$vw^2=vq^2+qw^2 = (vv'+ww')^2+(v'w')^2.$$ You can use the similarity of the three triangles in the diagram to compute $p$, should you need it.