  P= n \cdot (4 \cdot ( \frac{a+b}{2}\cdot \frac{d}{\sqrt {2}})) = \cdots = 2nd (a-d \cdot \tg \frac{180^o}{n}) \sqrt {2}