I'm trying to draw:
A set of $N$ (edit) irregular polygons one inside the other, where the innermost should be an equilateral triangle, enclosed by a square, enclosed by a pentagon, etc. Where all the points of each $N$-polygon touch sides of the $(N+1)$ - polygon. (Let's say up to $N = 8$)
Till now, I've began by drawing an equilateral triangle, taking one of the three vertices as reference point and I've tried to figure out (with no success) some relation between it and the next, encircling, polygon, such that the triangle vertices touch three of square's edges.
I can use some help in the form of any known function or recurrent relation related to the Cartesian coordinates of a polygon with N-vertices.
Edit: For the first two polygons, i.e. an equilateral triangle and a square, just noticed that the condition is fulfilled if the side of the triangle equals the side of the square. Graphically looks like this:
I wonder if this condition holds for the next iteration.
P.S. I'm using simple Euclidean Geometry to find the coordinates and some C++ (along with FLTK) to plot them, so the above plot is not just a picture.
Second Edit: as it turns out the only way the above condition is satisfied for the polygons to be irregular. Therefore, I'm adding it to the statement of the problem.