How to create nested polygon

So now the vertices of my first polygon will be( x1,y1) and the midpoints of my polygon(or the next points) will be(mx, my). I set up in the way that mx=(x1+x2)/2, my=(y1+y2)/2. I don’t know what should I write for x2 and y2 for this to make sense :anguished: And I seriously don’t know what to write to make this recursion.