First, we can check that there is no angular misalignment. Since 12 curved pieces are needed to make a full circle, the number of left pieces minus the number of right pieces must be a multiple of 12. Keeping track of the angle, starting at the crossing and going counterclockwise, I think that is satisfied in this setup:
Second, we look for positional misalignment. What we want to do is add up the vectors from the start to the end of each piece and check that the vector sum is zero. I haven't found a way to do this that ends up neater than just doing the trigonometry. However, things work out somewhat nicely.
For example, if we assume that a straight piece has length 1, then its vector at angle 0 (pointing to the right; I call this a 0-0
piece) is $(1,0)$. If we rotate this piece to angle 1 (30 degrees; I call this a 1-1
piece) then its vector is $\left(\cos{{30}^\circ},\sin{{30}^\circ}\right)=\left(\frac{\sqrt{3}}{2},\frac{1}{2}\right)$. A curve piece has a radius that is twice a straight piece so a curve that starts at angle 0 and ends at angle 1 (which I call a 0-1
piece) has a vector of $\left(2\sin{{30}^\circ},2\left(1-\cos{{30}^\circ}\right)\right)=\left(1,2-\sqrt{3}\right)$.
Note that the coordinates of these three vectors, and in fact the vectors for every piece orientation, are a fraction (rational number) plus $\sqrt{3}$ times another fraction (the fraction can be zero, e.g. $\frac{\sqrt{3}}{2} = \frac{0}{1} + \frac{1}{2}\sqrt{3}$. If we add two numbers of this form, the answer is just adding the pure fraction parts together and adding the $\sqrt{3}$ parts together; and because $\sqrt{3}$ is irrational, the only way the sum can be zero is for both parts to be zero. This is the same way that vector addition works: you add the coordinates to each other, and the result is the zero vector only if both coordinates are zero. Therefore we can treat our 2-d vectors of (possibly) irrational numbers as a 2 × 2 = 4-d vector of fractions.
To summarize, we can give each piece a list of 4 numbers, and the pieces form a loop only if summing the pieces' numbers with each other result in a list of four zeros. Those numbers are:
Curves:
0-1: 1 0 2 -1
1-2: -1 1 -1 1
2-3: 2 -1 1 0
3-4: -2 1 1 0
4-5: 1 -1 -1 1
5-6: -1 0 2 -1
...
Straights:
0-0: 1 0 0 0
1-1: 0 0.5 0.5 0
2-2: 0.5 0 0 0.5
3-3: 0 0 1 0
4-4: -0.5 0 0 0.5
5-5: 0 -0.5 0.5 0
...
Note that a 0-1
curve and a 1-0
curve have the same displacement so we only list the left-hand curve. Also, a 180-degree rotation just negates the coordinates, so we can get away with only calculating the first half of the table.
Adding up the pieces in the layout gives a result of 4.5 -3 -2 0.5
, i.e. a displacement of $\left(4.5-3\sqrt{3},-2+0.5\sqrt{3}\right)$. This is not zero, so the layout is not free of stress. In fact, if we draw out the path that the shown pieces would ideally take, we get this shape:
No combination of fewer than 5 pieces will complete the loop, however the following combination of 5 will: 3-4 3-4 1-1 8-8 11-11
. (There are 3 more combinations of 5 that give the correct displacement, but would add an odd number of curves and therefore cause angular misalignment.)
Note that instead of adding a piece we can remove its 180-degree rotation, so instead of adding 3-4
and 11-11
we can remove a 9-10
and 5-5
. Finally, remember that swapping the beginning and ending of a curve has the same displacement, so we can remove one 9-10
and one 10-9
instead of two 9-10
s. Putting this together, we can get s stress-free solution by removing a 10-9
, 9-10
and 5-5
and adding a 1-1
and 8-8
:
That's only if you want an 'exact' solution, for only changing a single piece you'd want to add a 2-2
, e.g. after the first gray curve, which would yield the following: