Holes in delaunay triangles

Sorry my ignorance, but perhaps someone here is able to answer this question straight from the line: is it possible for the surface made by delaunay triangulation to contain a hole in the middle of it?

If the answer is no - then there is a bug in ROOT, for I have such a case in my data. If answer is yes - sorry for wasting your time, I’ll have to code my own 2D interpolation procedure :slight_smile:

Do you have a small example showing your problem ?

I do, although not that short. One file in the archive is the script, second contains necessary data. One has to wait a while for the script to go over all “conincidencing points”. The whole is not well visible on TGraph2D plot - just a small white line. However histogram made from TGraph2D::Interpolate clearly shows it, inside the square (1.4, 400) (2.4, 440).

btw. the loop in the script makes graph for just one parameter. However, if one uncomments the line for making for all the parameters, it becomes visible, that only the last (39) par histogram does not contain the hole.
deltri.zip (47 KB)

Not working for me. I get:

root [0] .x draw_matrix.C
Error: fscanf param[0]=0 must not be 0 draw_matrix.C:23:
*** Interpreter error recovered ***
root [1]

Something missing ?

Yes, sorry - wrong path referencing to the data file. Attached with fixed path.
draw_matrix.C (4.47 KB)

Do yo also get 1000 of messages like:

Two of these three points are coincident 766 16 28

?

Despite them I get a plot, in which I do not see any hole.
Can you send me a picture showing what you call a " hole" ?

[quote=“couet”]Do yo also get 1000 of messages like:

Two of these three points are coincident 766 16 28

?
[/quote]

Unfortunately I did. However, I could not find any conincident points. Additionally, when I plot in carthesian coordinates, there are much less of such messages.

[quote]
Despite them I get a plot, in which I do not see any hole.
Can you send me a picture showing what you call a " hole" ?[/quote]

It is hardly visible on TGraph2D, but well visible on TH2 with points that are results of interpolation of the TGraph2D. There is a possibility, that this is a bug of Interpolate() not the delaunay triagulation itself…



Ok… i need time to investigate …

I did, at least one:
8 649 892

Line 154 and 4234 … fix that first.

Yes, that’s the only one I think and it fixes the “hole”. So in this way you answered my question: it is possible for the triangulation to contain a hole, if there are coinciding points.

However, it leads to another question: how to find out what points the algorithm has in mind when it is reporting the coinciding points?

Numbers like:
250 210 10

at the first glance have nothing to do with the point corrdinates:
649 892

that’s why I failed to find the coincidence…

The algorithm does not work properly when a (x,y) point has 2 z values. Just look at the way the algorithm works an you will understand. That’s why we print this message.

Yes, I understand. However it would be helpful if the algorithm somehow reported true points there are coincidencing. Current message is very misleading.

Yes … but that’s not that simple because the message occur after many transformation and the true points are not so easily available…Any way, as you saw it took me not too long to find out the faulty guy.

Yes, sorry I wasted your time. Sometimes long ago I assumed that TGraph2D can produce such messages when there are truly no coincident points. Connecting this with my attempt to find such points according to the printed message lead to this unnecessary problem report.