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

5 visualizaciones (últimos 30 días)
Kaustubh Tiwarekar
Kaustubh Tiwarekar el 5 de Mayo de 2020
Comentada: darova el 7 de Mayo de 2020
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 comentarios
darova
darova el 6 de Mayo de 2020
Is your data ordered or it's chaotic?
Kaustubh Tiwarekar
Kaustubh Tiwarekar el 7 de Mayo de 2020
I have attached exact data file. You can check that.

Iniciar sesión para comentar.

Respuestas (2)

darova
darova el 7 de Mayo de 2020
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 comentarios
John D'Errico
John D'Errico el 7 de Mayo de 2020
Editada: John D'Errico el 7 de Mayo de 2020
+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.

Iniciar sesión para comentar.


John D'Errico
John D'Errico el 6 de Mayo de 2020
Editada: John D'Errico el 6 de Mayo de 2020
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 comentarios
Kaustubh Tiwarekar
Kaustubh Tiwarekar el 7 de Mayo de 2020
Editada: Kaustubh Tiwarekar el 7 de Mayo de 2020
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 el 7 de Mayo de 2020
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.

Iniciar sesión para comentar.

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by