Drawing a Poincelet Porism How to draw a Poincelet porism?

In the above image, for the first case, we can draw the inner circle, then the triangle and then it's circumcircle.
But how to draw for the other cases and in general?
 A: It might be useful to keep in mind the proof of Poncelet's porism. You may start with a regular $n$-agon and its circumcircle and incircle (concentric). By applying a projectivity, then an affine transformation, you may send the polygon into a polygon and the circumcircle/incircle couple into a couple of off-centered circles. In this new configuration, every polygonal path with its vertices on the circumcircle and its sides tangent to the incircle closes in $n$ steps. In the $n=4$ case it is pretty simple to construct a bicentric polygon:


*

*Start with a circle $\Gamma_{in}$ and a point $P$ outside of it;

*Draw the tangents from $P$ to $\Gamma_{in}$ and let $\theta$ denote the angle between such tangents;

*Construct a point $Q$ such that the angle between the tangents to $\Gamma_{in}$ from $Q$ is $\pi-\theta$;

*Then the tangents from $P$ and the tangents from $Q$ are the sides of a bicentric quadrilateral inscribed in a circle $\Gamma_{out}$;

*$\Gamma_{in},\Gamma_{out}, n=4$ is a Poncelet configuration.

