I create a TGraphDelaunay object and write it to a ROOT file. I’m having some trouble reading the object back, because ROOT crashes when I want to access the object (but it seems to read the TGraphDelaunay fine). Please see the attached macro.
I’m using ROOT version 5.29/02 (SVN Revision 39011) on Linux.
Thanks for any hints,
test_delaunay.C (1.91 KB)
I ll check your macro, but keep in mind that TGraphDelaunay is meant to be used through TGraph2D…
Why to you need to use TGraphDelaunay directly ?
[quote=“couet”]I ll check your macro, but keep in mind that TGraphDelaunay is meant to be used through TGraph2D…
Why to you need to use TGraphDelaunay directly ?[/quote]
I need to evaluate the interpolation many times, so I want to make sure that it’s created only once.
My impression was that calling TGraph2D->Interpolate() will construct the triangulation on each call. But I guess that’s not true, and it is created only once. But when - automatically during the creation of the TGraph2D object?
I just looked at your macro and see you want to interpolate.
Yes I would recommend that you use Interpolate from TGraph2D.
The triangles will not be recreate each time you call it.
The triangulation is somehow an heavy computation and we do it only once.
I am not at CERN (holidays in fact), I can check your macro when I’ll be back.
But I guess the best is to use Interpolate from TGraph2D.
If you think it is to slow please contact me again.