Problem 42789. Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area of the circle bounding it, while the radius of the circle bounded by the polygon goes to the radius of the bounding circle.
Given the radius of the bounding circle, R, and the number of sides of a regular polygon, n, return the polygon's perimeter, p, and area, a, as well as the radius of the circle bounded by it, r.
Note: n will always be an integer greater than 2. R will always be a real number greater than zero.
Example (square):
R = 1
n = 4
p = 5.6568
a = 2
r = 0.7071
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers42
Suggested Problems
-
Convert from Base 10 to base 5
280 Solvers
-
Generate a vector like 1,2,2,3,3,3,4,4,4,4
13504 Solvers
-
Simple equation: Annual salary
4251 Solvers
-
242 Solvers
-
Number of Even Elements in Fibonacci Sequence
1631 Solvers
More from this Author45
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!