A tetrahedron has $6$ edges, which should be instructive. For any edge, draw the one median line on each of the two opposite triangles that meet the edge at one of its two vertex endpoints. That gives a triangle, and the plane it lies in constitutes a median plane because it splits the tetrahedron symmetrically in half.
Here's an illustration of the two medians corresponding to the edge on the $y$-axis:
$\hskip 1.5 in$
(I shifted the medians over to the right a bit so you could see them both.) Image source is here, though I obviously added in the red medians using MSPaint.
A cube (the one with sides parallel to coordinate axes)
centered at the point $P=(x_0,y_0,z_0)$ of "radius" $r$
(and edge length $d=2r$)
has vertices $V_n=(x_0\pm r,y_0\pm r,z_0\pm r)$,
which could be enumerated for
$0\leq n=(b_2b_1b_0)_2=\sum_{i=0}^22^ib_i\leq 7$,
where $b_i=$(n>>i)&1
is the $i^\text{th}$ bit of $n$,
using the bitwise shift >>
and AND &
operators
(familiar in C-like languages & Java), as
$$
V_n=(x_0+(-1)^{b_0}r,y_0+(-1)^{b_1}r,z_0+(-1)^{b_2}r).
$$
The number of edges between two vertices $V_j,V_k$
would then be the bit weight of XOR$(j,k)=j$^$k$,
which is also known as the hamming distance.
You could emulate cube rotation by making the
opposite/inverse rotation in your perspective.
As column vectors, you could write
$$
P=\left[\begin{matrix}x_0\\y_0\\z_0\end{matrix}\right],\quad
R_n=r\left[\begin{matrix}\pm1\\\pm1\\\pm1\end{matrix}\right]
=r\left[\begin{matrix}(-1)^{b_0}\\(-1)^{b_1}\\(-1)^{b_2}\end{matrix}\right],\quad
V_n=P+R_n
$$
where $R_n$ are the radial vectors from the center $P$
to each vertex $V_n$. This would make it easier to rotate
your cube. You'd just need a rotation matrix $M$,
i.e. an orthogonal matrix
(which means that its transpose equals its inverse: $M^T=M^{-1}$)
with determinant $+1$ (also called special orthogonal),
and then $V_n=P+M\cdot R_n$ would give you the rotated vertices.
To rotate it about an arbitrary axis, you would need a special
orthogonal matrix $Q$ (for change of basis)
with a unit vector parallel to the
axis of rotation in say the $3^\text{rd}$ column
(and the other two columns containing perpendicular unit vectors
satisfying the right-hand rule), and a rotation matrix
such as this, which rotates the $xy$-plane about the $z$-axis:
$$
S=
\left[
\begin{matrix}
\cos\theta & -\sin\theta & 0 \\
\sin\theta & \cos\theta & 0 \\
0 & 0 & 1
\end{matrix}
\right].
$$
Then you could take $M=QSQ^T$ (cf. 3D graphics approach).
Another excellent method for generating rotations,
recommended by @J.M. and which you may prefer,
uses Rodrigues' rotation formula.
The modern computer graphics approach is usually a bit different
than the matrix math of 3D linear transformations,
because it uses perspective projection,
which uses a $4\times4$ matrix.
Since you mention OpenGL, for a cube
you might want to look some place like here or here.
Best Answer
The required tetrahedral angle is $\arccos\left(-\frac13\right)\approx109.5^\circ$. You can use the law of cosines to show this... or more transparently, you can exploit the fact that a tetrahedron is easily embedded inside a cube:
I suppose now's as good a time as any to post the synthetic proof.
One can use the Pythagorean theorem to show that a square with unit edge length has a diagonal of length $\sqrt 2$. The Pythagorean theorem can be used again to show that a right triangle with leg lengths $1$ and $\sqrt 2$ will have a hypotenuse of length $\sqrt 3$ (corresponding to the triangle formed by an edge, a face diagonal, and a cube diagonal). We know that the diagonals of a rectangle bisect each other; this can be used to show that the diagonals of a cube bisect each other. From this, we find that the side lengths of the (isosceles!) triangle formed by two half-diagonals of the cube (corresponding to two of the arms of your caltrops) and a face diagonal are $\frac{\sqrt 3}{2}$, $\frac{\sqrt 3}{2}$, and $\sqrt{2}$. From the law of cosines, we have
$$2=\frac34+\frac34-2\frac34\cos\theta$$
where $\theta$ is the obtuse angle whose measure we are seeking. Algebraic manipulation yields $\cos\,\theta=-\frac13$.