Apologies if this is has an obvious answer, but I've been stuck on this for a bit now.
I've been trying to figure out how to make a symmetrical polygon with a base of m length, with n additional sides of s length using just those values, and I've gotten stuck. I'm not looking for an answer per se (although it would be appreciated). I'm looking for a next step that I might have overlooked.
This shape has some given values and rules.
- n is the number of sides excluding the base, and must be at least 2
- m can be any length between $0$ and $n \cdot s$
- The shape is symmetrical, the line of symmetry is perpendicular to the base and $\frac{m}{2}$ from either endpoint of the base.
- In practice, s, n, and m are known values
Here is a picture of what I am describing:

In this example I've built the shape in reverse. I set $n=5$, $s=3$, and $\theta = 110 ^\circ$. I've also found a relationship between the angles using the angle sum of a polygon: $$ \theta = 180 - \frac{2\zeta}{n-1}, \zeta= \frac{(180 - \theta)(n-1)}{2}$$ Using that (and Geogebra) I found that $\zeta = 140 ^\circ$. But ideally, I would like to calculate $\theta$ from n, s, and m without setting $\theta$ beforehand.
I'm looking for an equation for $\theta$ and $\zeta$. I know their values relative to each other, but I haven't been able to figure out how to properly find these angles, aside from making triangles out of the entire thing, which I'm still unsure on where to start using just those values. Any help would be appreciated.


Map everything to complex numbers.
Let $\psi = \pi - \theta$ be the common external angle among the $n$ segments of length $s$.
Let $z = e^{i\psi}$. This is the "rotation" one need to rotate the $k^{th}$ segment of length $s$ to the orientation of $(k+1)^{th}$ segment.
What we need to do is find a $\psi$ such that $s|1 + z + \cdots + z^{n-1}| = m$. i.e. a $\psi$ which make the endpoints of the polyline of $n$ segments at a distance $m$ apart. This leads to
$$s \left|\frac{z^n-1}{z-1}\right| = m \quad\iff\quad s \sin\frac{n\psi}{2} - m \sin\frac{\psi}{2} = 0 \tag{*1}$$
Since $0 < m < ns$, the equation on RHS has real solutions. The smallest positive solution of $\psi$ is the one we need (other solutions give us self-intersecting polygons).
One can rewrite RHS of ($*1$) in terms of Chebyshev polynomials of 2nd kind:
$${\rm RHS}(*1) \quad\iff\quad U_{n-1}\left(\cos\frac{\psi}{2}\right) = \frac{m}{s}$$
For small $n$ (even $n \le 4$ and odd $n \le 9$), this allow us to express $\sin\frac{\theta}{2} = \cos\frac{\psi}{2}$ as radicals and hence $\theta$ in terms of elementary functions. For other $n$, we have no choice but to solve $\psi$ numerically.