It's well known to me that the sequence of $N$ line segments in $\mathbb{R}^2$ can be a closed loop only if the sum of angles between neighboring segments is equal to $(N-2)*180°$.
By analogy, in order to define a sequence of $N$ line segments in $\mathbb{R}^3$ one must use $2N$ values, for example, $N$ angles just like in the case of $\mathbb{R}^2$ and $N$ dihedral angles (see definition on Wikipedia).
My question: Is there any explicit way to express the condition of closed loop of $N$ linear segments in $\mathbb{R}^3$ as a relation between $2N$ angles?