Vertices of regular n-gon.
Show older comments
I want to find the perimeter of a regular inscribed polygon given N sides. I have a function that will calculate the distance from a set of coordinates. I have the following code to find the coordinates of the vertices for a regular n-gon;
x = cos(n.*(2*pi)./N);
y = sin(n.*(2*pi)./N);
I just don't know to store individual coordinates to pass through my function to find the distance between each vertex.
Accepted Answer
More Answers (1)
Steven Lord
on 8 Nov 2017
0 votes
Categories
Find more on Mathematics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!