0
area = ((length ** 2) * numSides) / (4 * (math.tan(FULL_ROTATION / (2 * numSides)\
)))

this is my thought but I can't figure it out, I always get the wrong value.

I need to get my answer in degrees. but even when i use

return math.degrees(area)

at the end of my function the answer is way off.

4
Contributors
3
Replies
6
Views
7 Years
Discussion Span
Last Post by vegaseat
0

How about:

area = ((length**2)*numosides/4) / math.tan( math.pi/numosides )

Area isn't in degrees...

0

Your area formula for regular polygons should be:

area = ((length**2) * numSides)/(4 * (math.tan(math.pi/numSides)))

Your result will be square units of whatever units of measurement your sides are. You cannot get degrees for the area!

0

If you make the regular polygon a square with side length = 1.0, you should get an area of 1.0. A simple test to see if the area formula is correct.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.