Hello,
the following example shows that isosurface drawing with TF3 and GL seems to draw the surface level
f(x,y,z)=-0.2 whereas without GL options it draws the surface level f(x,y,z)=0.
Here i take for example f(x,y,z)=xyz.
Do i miss the correct way to specify the value of the function?
Thanks,
Frédéric Faure.
#include <TApplication.h>
#include <TCanvas.h>
#include <TStyle.h>
#include <TPaveLabel.h>
#include <TFormula.h>
#include <TF3.h>
#include <TText.h>
//-----------------------------
main ()
{
TApplication theApp("App", nullptr, nullptr);
//----- With GL ---------
//.... prepare the 3D window
gStyle->SetCanvasPreferGL(1);
TCanvas *cnv = new TCanvas("glc", "TF3: Surface", 200, 10, 600, 600);
TPad *tf3Pad = new TPad("box", "box",0,0,1,1);
tf3Pad->Draw();
//.... define and draw the 3D object
TF3 *tf3 = new TF3("Surface","x*y*z+0.2", -1,1,-1,1,-1,1);
tf3->SetFillColor(kRed);
tf3Pad->cd();
tf3->Draw("gl");
TText *texte=new TText(0.2,0.9,"f(x,y,z)= x*y*z+0.2");
texte->Draw();
//----- Without GL ---------
auto c2 = new TCanvas("c2","c2", 1000, 1000);
TF3 *tf3bis = new TF3("Surface","x*y*z", -1,1,-1,1,-1,1);
tf3bis->Draw("FBBB");
//------------------------
theApp.Run();
}
__
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided