Experts Exchange > Questions > Calculate the radius of a n-sided polygon such that the area of the polygon matches the area of a circle with the same radius.

Solved

Calculate the radius of a n-sided polygon such that the area of the polygon matches the area of a circle with the same radius.

This creates an n-sided closed polygon whose points lie on a circle of the same radius - you can see this in action at n-sided polygon fits inside circle.

What I would like is actually 2 fold.

1 - To calculate the path of an n-sided polygon so that the circle fits inside the polygon (just like the existing polygon fits inside the circle)
2 - To calculate the path of an n-sided polygon so that the area of the circle and the polygon are the same.

Don't worry about the coding, if you have issues with that, just the maths required will be enough for me.

I'm guessing that all I really need is to adjust the meters/miles conversion as this is all that actually alters the side the polygon.

Regards,

Richard Quadling.

P.S. I'm using Google Chrome V10, so the sliders are not going to be visible in older browsers - simply enter the number and tab off the input seems to work OK for IE/FF. This is just a test script, so not an important issue.

Note: since your code uses degrees, not radians, so am I. If you get really weird results, change all the 360s and 180s to 2pi and pi.

Given a circumradius c (distance from center to vertex) the area is
nc^2sin(360/n)/2
So if the circle's area is A then you want to make your vertices
sqrt(2A/nsin(360/n))
from the center.

To circumscribe the polygon around the circle, you want the apothem a (distance from center to closest point on edge) to be the same as the radius of the circle so you want the vertices to be
r sec(180/n)
from the center (where r is the radius of the circle and sec(180/n)=1/cos(180/n)

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

as Google Maps wants the value in meters and my users think in miles (as do the drivers).

Thank you all. Extremely useful comments.

Richard.

0

Featured Post

Whether you need to trade-up to a shiny new Firebox or just ready to upgrade from whatever appliance you're using now, WatchGuard has the right appliance for you! Find your perfect Firebox today with appliance sizing tool!

Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…

The viewer will learn the basics of jQuery including how to code hide show and toggles.
Reference your jQuery libraries:
(CODE)
Include your new external js/jQuery file:
(CODE)
Write your first lines of code to setup your site for jQuery…

Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…