The moduli space (meaning congruent polygons are considered as equal) of open regular polygons $\gamma_0,\ldots,\gamma_n$ in the plane can be parametrized by parameters
\[(\ell_0,\ldots,\ell_{n-1},\kappa_1,\ldots,\kappa_{n-1})\in (0,\infty)^{n-1} \times (-\pi,\pi)^{n-2}.\]
If we we want to construct an actual polygon from such data we first define $\alpha_0,\ldots,\alpha_{n-1}$ as
\[\alpha_j=\kappa_1+\ldots+\kappa_j.\]
From these we define normalized edge vectors $T_j=e^{i\alpha_j}$ and finally the polygon itself: For $j=0,\ldots,n$ we set
\[\gamma_j=\ell_0 T_0+\ldots+\ell_{j-1} T_{j-1}.\]
The direction of the edge joining $\gamma_j$ to $\gamma_{j+1}$ is given by $T_j=e^{i\alpha_j}$ with . Then the position $\gamma_n$ of the last vertex (equal to $\gamma_0$ for a closed polygon) is given a
\[\gamma_n=\ell_0 e^{i\alpha_0}+\ldots +\ell_{n-1} e^{i\alpha_{n-1}}.\]
Theorem (Schläfli Formula): From given parameters
\[(\ell_0,\dots,\ell_{n-1},\kappa_1,\ldots,\kappa_{n-1})\in (0,\infty)^{n-1} \times (-\pi,\pi)^{n-2}\]
construct a polygon $\gamma_0,\ldots,\gamma_n$ as described above. Consider a variation $(\dot{\ell}_0,\dots,\dot{\ell}_{n-1},\dot{\kappa}_1,\ldots,\dot{\kappa}_{n-1})$ of these parameters and define
\[\dot{\kappa}_n:=-(\dot{\kappa}_1+\ldots+\kappa_{n-1}).\]
Then the corresponding variation of $\gamma_n$ will be given by
\[\dot{\gamma}_n=\sum_{j=0}^{n-1} \, \dot{\ell}_j T_j-i \sum_{j=1}^{n} \dot{\kappa}_j \gamma_j.\]
Proof: For $j=0,\ldots,n$ define $\dot{\alpha}_j:=\sum_{k=1}^j \,\dot{\kappa}_k$.
Then $\dot{\alpha}_0=\dot{\alpha}_n=0$ and
\begin{align*}\dot{\gamma}_n &=\sum_{j=0}^{n-1} \, (\dot{\ell}_j +i\ell_j \dot{\alpha}_j) e^{i\alpha_j}\\\\ &= \sum_{j=0}^{n-1} \, \dot{\ell}_j T_j +i \sum_{j=1}^{n-1} \dot{\alpha}_j (\gamma_{j+1}-\gamma_j) \\\\ &= \sum_{j=0}^{n-1} \, \dot{\ell}_j T_j+i \dot{\alpha}_{n-1}\gamma_n -\dot{\alpha}_1 \gamma_1-i \sum_{j=2}^{n-1} (\dot{\alpha}_j-\dot{\alpha}_{j-1}) \gamma_j\\\\ &=\sum_{j=0}^{n-1} \, \dot{\ell}_j T_j-i (\dot{\alpha}_n-\dot{\alpha}_{n-1})\gamma_n -i(\dot{\alpha}_1-\dot{\alpha_0}) \gamma_1-i \sum_{j=2}^{n-1} \dot{\kappa}_j \gamma_j\\\\ &=\sum_{j=0}^{n-1} \, \dot{\ell}_j T_j-i \sum_{j=1}^{n} \dot{\kappa}_j \gamma_j.\end{align*}
$\square$