what is the maximum diameter of convex polygons ?

조회 수: 8 (최근 30일)
jahanzaib ahmad
jahanzaib ahmad 2018년 12월 26일
편집: Matt J 2018년 12월 26일
is it the maximum distance between the vertices or something else ?

채택된 답변

John D'Errico
John D'Errico 2018년 12월 26일
편집: John D'Errico 2018년 12월 26일
This is not a question about MATLAB, but since it already has an answer...
Yes. You should be able to prove that the maximal diameter must lie between two vertices of the polygonal region. I would do that by starting with a pair of parallel lines in the plane that do not intersect the polygon, but contain the polygon between them. You can move them closer together, until they just touch the polygonal region. Clearly that event will happen when one or more of the vertices of the polygon lie along each of the parallel enclosing lines. The diameter of the polygon in that direction is just the distance between the lines.
Now rotate the lines you would consider, implicitly creating a function of the dameter of the polygon at any rotation angle. Clearly this function is continuous, though not differentiable. Still it will have a well defined maximum. That maximum need not be unique (consider a square).
In the end, you will have shown that the maximum diameter will be given by the maximum Euclidean distance between any pair of vertices of the polygon, so pdist, applied to the polygonal vertices, will suffice.
  댓글 수: 2
jahanzaib ahmad
jahanzaib ahmad 2018년 12월 26일
thanks john . but because i m matlab user thats y i asked it here ..and coz mathworks is really great experience for me ..
can u please share some reference
John D'Errico
John D'Errico 2018년 12월 26일
Sorry. No ref available. The proof seems pretty clear though, following the outline I provided.

댓글을 달려면 로그인하십시오.

추가 답변 (3개)

Matt J
Matt J 2018년 12월 26일
편집: Matt J 2018년 12월 26일
You can prove it using some theorems below from convex analysis. You should be able to find them in any convex analysis text, but I provide links to some online Stack Exchange proofs.
  1. A convex function maximized over a convex polyhedron attains its maximum at a vertex of the polyhedron (link).
  2. The direct difference between any two convex polyhedra P and Q is also a convex polyhedron and the vertices of P-Q are differences of a vertex of P and a vertex of Q (link).
Now apply this to the maximum diameter problem where P denotes the given polygon. The problem can be written,
Since ||d|| is a convex function it must attain its maximum (by 1 above) at a vertex of P-P which (by 2 above) is a difference of two vertices of P.

KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 12월 26일
편집: KALYAN ACHARJYA 2018년 12월 26일
Use this link to get the answer (Source: Walter Answer)
  댓글 수: 3
jahanzaib ahmad
jahanzaib ahmad 2018년 12월 26일
편집: jahanzaib ahmad 2018년 12월 26일
mean_max = cellfun( @(x) [mean(pdist(x)) max(pdist(x))], P, 'UniformOutput', 0);
my question is that "is the maximum diameter of convex polygons is the max distances between any two furthest vertices ? " or not if not what is it ?
KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 12월 26일
Yes

댓글을 달려면 로그인하십시오.


Image Analyst
Image Analyst 2018년 12월 26일
You might want to look at Steve's extensive discussion of Feret Diameters: Click Here

카테고리

Help CenterFile Exchange에서 Bounding Regions에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by