Say you were drawing n-sided regular polygons on a square grid (first side you drew being flat always). You wanted any polygon you drew to be 100 units high, aka the uppermost point being y = 100. With a square, this would mean you would want the perimeter to be 400, because if each side was 100 then from top to bottom it would be 100.
I know a rough approximation of some answers, so for # of sides, 4 = 100, 5 = ~65, 6 = ~58, 7 = ~45, 8 = ~41.5, 9 = ~35, etc.
I'm hoping there is some sort of formula for this, where given the desired total height and # of sides, you could come up with a measure for the perimeter and thus each side length.
I tried playing with Pythagorean theorem, triangle areas, apothems, etc. but I don't have a firm enough grasp on that stuff to put something together.
EDIT: I think I got it, perimeter = n*height*tan(180/n)