Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Filling in a sequence that might be circulated or have holes

1 visualización (últimos 30 días)
Ben Bleiman
Ben Bleiman el 8 de Feb. de 2011
I am trying to match two sets of vertices to each other. The values should essentially the same (within tolerance), but there order is out of alignment.
For most vertices this isn't a problem. I do a quick test on their relative distances and if they are within tolerance (and no other points occupy that region) then that point is assigned. However since I am dealing with closed polygons each shape has two identical points at the start and end. The second sequence is always in order, but doesn't necessarily start at the same point. For Example:
Vector 1 5 6 7 8 9 10
Vector 2: 12 13 14 15 16 11 <--the last two in this sequence have the same value.
So my vector 2 looks like this:
12 13 14 15 0 0
with the knowledge that point 11 and 16 are the missing ones. But vector two could also look like this:
0 0 12 13 14 15
or: 14 15 0 0 12 13
and there is the possibility that the order could be completely reversed:
15 14 13 12 0 0
I am sure there is a simple way to work out the order that these indices should go. Does anyone have any ideas?
As an aside there are also possibility of the majority of vertices in a sequence to occupy the same location. So a generalized version would be great. Thanks Ben
  1 comentario
j dr
j dr el 8 de Feb. de 2011
Can you give an example that does what it's supposed to ?
I don't understand where this is going (what you want to achieve)

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by