How to get set of outermost points out of given data set

5 次查看(过去 30 天)
I have a planar data set of points. I want to points which are outermost points of the data set. For more clarification pleasee attached images.
1) Availabe data set.
2) Expected output
I hope this clarifies my question.
I tried using boundary function but it lacks accurecy even at shink coeff = 1.
Anyone know how to get tight boundary around points data set?
Thank you.
  4 个评论

请先登录,再进行评论。

回答(2 个)

darova
darova 2020-5-7
I calculated angle of each point. Sortet by angle to put them in some order
Used polyxpoly to find intersection points
polyxpoly also return indices/numbers of points/segments are intersected
result
  2 个评论
John D'Errico
John D'Errico 2020-5-7
编辑:John D'Errico 2020-5-7
+1. Best to do is as suggested here. Treat it as two polygons, then combine them into one. As a thought, this might be doable using polyshapes.

请先登录,再进行评论。


John D'Errico
John D'Errico 2020-5-6
编辑:John D'Errico 2020-5-6
Has nobody answered you? Oh well. here goes. Part of the problem is you only showed a picture of your data. A picture may be worth a thousands words, but some data too? Way more, at least if you seriously want help. That is, I would probably have answered your question a day or so ago, if you did. I'm not going to make up some data though that is similar to what you have, so if you want better help, then make it easier to provide help.
I would use an alpha shape. You need to be careful though. Don't use too small of a value for the alpha radius. You also need to control how it deals with internal holes.
You can find the alpha shape tool in MATLAB as just alphaShape. You can then find the boundary polygon as one of the methods offered for the alpha shape. That will be what you need.
There will be only one problem - the internal cusp where the elliptical curve crosses the other curve. That will be difficult to resolve using an alpha shape on this data.
  2 个评论
Kaustubh Tiwarekar
编辑:Kaustubh Tiwarekar 2020-5-7
Thank you for your suggestion John.
I tried using alphShape function but I am unable to get rid of internal points. Please see if that can be achieved. I have also attached data set in the question, you can use the data in x-z plane (y is a constant value).
Thank you.
John D'Errico
John D'Errico 2020-5-7
Hmm. It looks like an alpha shape does not do your data justice. That is because parts of your data are too sparse, too widely separated from their neighbors, while the intersection that you will need to resolve is a sharp internal cusp. An alpha shape will be a poor solution here.
Use what Darova is suggesting instead.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by