Problem:
Given a sequence of $n$ lengths, $L_1,L_1,...,L_n$ where each $L_k$ is the length of the $k$th side, I need to find a sequence of $n$ points, where $p_k=(x_k,y_k)$, such that $\operatorname{dist}(p_k,k_{k+1})=L_k$ and where $\operatorname{dist}(a,b)$ is the Euclidean distance between $a$ and $b$. So they way the sequence goes, $p_1=(0,0)$ then $p_2=(0,L_1)$. The points must correspond to the ordered clockwise vertices of the simple polygon having the maximum possible area for the given side lengths.
For example, if we were given the lengths $1,1,1$, then obviously this is an equilateral triangle. And the maximum area is given by the coordinates, $(0,0),(0,1),(\sqrt{1-0.25},0.5)$.
Another example, if we were given the lengths $1,2,1,2$, then we would get a rectangle with coordinates $(0,0),(0,1),(2,1),(2,0)$.
How would I work this out for large $n$ or in general for every $n$? Because I cannot think of a way past the case of a square/rectangle.