Take a cube and chose two opposite vertices. Draw a line that runs straight from one vertex to a point on an edge of the cube, and from that point straight to the other vertex. Think of it as a surface diagonal(ish) that crosses two faces of the cube, but doesn’t have to pass through the center of the intervening edge.
How do I find the internal angle made by those two line segments?
Think of this as a variant of the ant-on-a-cube problem described here, but the ant isn’t necessarily taking the shortest route, and I’m not interested in the length of the line, but rather in the spatial angle the two red segments make with one another.
If the ant ran up one edge and then across the diagonal to the opposite corner, the internal angle would be 90º. The same if he ran across the diagonal, then along an edge. The angle is probably a maximum if he hits the halfway point on the intervening edge, but how do I find it? Or find the angle for any other intermediate case, like hitting the 1/3 mark on the intervening edge?
Doing some geometry I think that I get an angle of ~101.5º for the ant-problem case where the ant hits the midpoint of the intervening side.
The diagonal of the unit cube has length sqrt3, and each path on the surface is length sqrt1.25, making an internal triangle of lengths sqrt1.25, sqrt1.25, and sqrt3.
Actually, I think that that approach will let me solve for other paths too.
Suppose you have a cube with side lengths s situated in 3-space such that one vertex is at (0, 0, 0) and another is at (s, s, s). Pick a point on the edge between the vertices (0, 0, s) and (0, s, s), call it (0, a, s) with 0 \le a \le s. Then we can use the relationship between the dot product of two vectors and the angle between them, u \cdot v = |u| |v| \cos \theta, to find the measure of the angle where the path crosses the edge.
In this case we get \cos \theta = -\frac{a (s - a)}{\sqrt{(s^2 + a^2)(s^2 + (s-a)^2)}}.