MATLAB Answers

Hi, I am finding area enclosed by convex hull using delayunayt​​riangulat​i​on,,,i have pasted the code...I just need someone to tell me..the area i got is right according to my code?

5 views (last 30 days)
L K on 20 Mar 2017
Commented: L K on 21 Mar 2017
polar(theta_rad, radius1, 'b*');
hold on;
[x, y] = pol2cart(theta_rad, radius1);
k = convhull(x, y);
xch = x(k);
ych = y(k);
[thetaCH1, rhoCH1] = cart2pol(xch, ych);
polar(thetaCH1, rhoCH1, 'ro-');
DT = delaunayTriangulation(theta_rad(:),radius1(:));
i got v=130.8648.... is it the right way to do it ?

Accepted Answer

John D'Errico
John D'Errico on 20 Mar 2017
NO. You cannot compute a convex hull of your points when they are represented in polar coordinates!!!!! If you did, the result will be nonsensical. And the area it would compute will certainly be nonsense.
Instead, convert the polar coordinates to cartesian coordinates, then compute the area of the convex hull in Cartesian coordiantes:
DT = delaunayTriangulation(x(:),y(:));
[H,A] = convexHull(DT);
A =

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!