Bicentric heptagons
A bicentric heptagon is one for which all vertices lie on a circle, and for which all edges are tangential to another circle. If \(R\) and \(r\) are the radii of the outer and inner circles respectively, and \(d\) is the distance between their centres, there is an expression which relates the three values when a bicentric heptagon can be formed.
To start, define
\[ a = \frac{1}{R+d},\quad b = \frac{1}{R-d},\quad c = \frac{1}{r} \]
and then:
\[ E_1 = -a^2+b^2+c^2,\quad E_2 = a^2-b^2+c^2,\quad E_3 = a^2+b^2-c^2 \]
The expression we want is:
\[ E_1E_2E_3+2abE_1E_2 -2bcE_2E_3-2acE_1E_3=0. \]
See the page at Wolfram Mathworld for details.
However, a bicentric heptagon can exist in three forms: a convex polygon, and two stars.
The above expression, impressive though it is (even more so when it is rewritten in terms of \(R\), \(r\) and \(d\)), doesn't give any hint as to which values give rise to which form of polygon.
However, suppose we scale the heptagon by setting \(R=1\). We can then rewrite the above expression as a polynomial is \(r\), whose coefficients are functions of \(d\):
\begin{multline*} 64d^2r^6-32(d^2+1)(d^4-1)r^5-16d^2(d^2-1)^2r^4+8(d^2-1)^3(3d^2+1)r^3\\ -4(d^2-1)^4r^2-4(d^2-1)^5r+(d^2-1)^6=0. \end{multline*}
and this can be simplified with the substitutions \(u=d^2-1\) and \(x=2r\):
\[ (u+1)x^6-u(u+1)(u+2)^2x^5-u^2(u+1)x^4+u^3(3u+4)x^3-u^4x^2-2u^5x+u^6=0. \]
Since \(R=1\), it follows that \(d\) (and so also \(u\)) is between 0 and 1, and it turns out that in this range the sextic polynomial equation above has four real roots, of which only three can be used. For the other root \(d+r>1\), which would indicate the inner circle not fully contained in the outer circle.
You can play with this polynomial here:
Then the different forms of the bicentric heptagon correspond with the different roots; the root with the largest absolute value produces a convex polygon, the root with the smallest absolute value produces the star with Schläfli symbol \({7:3}\) (which is the "pointiest" star), and the other root to the star with symbol \({7:2}\). Look at the table on the Wikipedia page just linked, and the column for heptagons.
Here are the heptagons, which because of Poncelet's Porism, can be dragged around (if the diagram doesn't update, refresh the page; it should work):