create polygon section with equal sides

42 Views Asked by At

polygons

I have to create essentially these sections of a polygon.

I have width(W) and height (H), and number of sides (3 on left abc and 4 on right image ABCD)

I need each side to be equal. How can I achive this given H, W, Num of Sides?

Some guidelines on what to consider will be useful

Thanks