for fixed $\theta>0$ I want to derive the volume of the polyeder $$V= \{ x=(x_1,\dots,x_n)\in\mathbb{R}^n| \forall (i,j): |x_i-x_j|<\theta, x_i\in[0,1] \}.$$
Unfortunately, I already fail to do so for $n=3$ and even to understand the form of this object. I know that the line $x_1 = x_2 = \dots = x_n$ is always included in $V$ but otherwise I am a bit lost. Is there a formula for that? And does maybe someone know a programm do plot it in the 3d case?
Note that the inequality $|x_i-x_j| \le \theta$ is equivalent to the two linear inequalities $$-\theta \le x_i - x_j \le \theta.$$
Hence the polyhedron $\overline{V}$ has $2\binom n 2=n(n-1)$ facets given by these inequalities and $2n$ facets given by $0\le x_i\le 1$, so $n(n+1)$ facets in total. In the case $n=3$ you get $6$ facets forming a hexagonal tube around the line spanned by $(1,1,1)$ which is then intersected with the unit cube.
For visualization you can for example use the SageMath code
which you could also run online on a Sage Cell Server. (You have to wait a bit for the applet to load and render the polyhedron)