
Here's How I would do the basic shape, I'll leave the labels to you.
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[thick]
\draw (0, 0) rectangle (8, 8);
\node[rotate=34.8, minimum size=2cm] (S) at (4, 4) {};
\draw (0, 0) -- (S.south east);
\draw (0, 8) -- (S.south west);
\draw (8, 0) -- (S.north east);
\draw (8, 8) -- (S.north west);
\end{tikzpicture}
\end{document}
Here's how it works.
First draw the outer box. Then draw a node, S
in the middle, the default node shape is square.
Connect the corners of this node to corners of the outer square but going one corner anticlockwise so top left of the outer box goes to bottom left of the inner box etc.
Then rotate the node. There are two ways to do this, trial and error, try angles until everything lines up nicely, or maths.
Maths for those interested
Let d
be the length of the side of the inner box, c
is the length of the side of the outer box.
Then looking at the diagram we see d = a - b
taking a
as the longer of the two non-hypotenuse sides of the triangle.
Then we look at the triangles and notice that the angle in the bottom left from the horizontal to the almost diagonal is the same as the angle of the inner square, call this angle theta
.
Applying trig definitions we know that b/c = sin(theta)
and a/c = cos(theta)
. Hence (b - a)/c = sin(theta) - cos(theta) = d/c
.
Since d
and c
are known (I arbitrarily chose 8 cm and 2 cm) we just need to find theta
, this can be done with trig identities, or like I did, ask wolfram alpha. The answers it gives are not necessarily immediately correct, for example I had to subtract 180 degrees before I got the answer of 34.8 degrees.