Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
glplot.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_eve
3 /// Preliminary demo for showing Timur's GL plots in EVE.
4 ///
5 /// \image html eve_glplot.png
6 /// \macro_code
7 ///
8 /// \author Matevz Tadel
9 
10 void glplot()
11 {
12  TEveManager::Create();
13  gEve->GetDefaultGLViewer()->SetCurrentCamera(TGLViewer::kCameraPerspXOY);
14 
15  auto f2 = new TF2("f2","x**2 + y**2 - x**3 -8*x*y**4", -1., 1.2, -1.5, 1.5);
16  f2->SetFillColor(45);
17  auto x = new TEvePlot3D("EvePlot - TF2");
18  x->SetLogZ(kTRUE);
19  x->SetPlot(f2,"glsurf4");
20  x->RefMainTrans().MoveLF(2, 1);
21  gEve->AddElement(x);
22 
23  auto h31 = new TH3F("h31", "h31", 10, -1, 1, 10, -1, 1, 10, -1, 1);
24  auto gxy = new TF3("gaus2","xygaus");
25  gxy->SetParameters(1,0,1,0,0.3);
26  h31->FillRandom("gaus2");
27  h31->SetFillColor(2);
28  x = new TEvePlot3D("EvePlot - TH3F");
29  x->SetPlot(h31, "glbox");
30  x->RefMainTrans().MoveLF(2, -1);
31  gEve->AddElement(x);
32 
33  gEve->Redraw3D(kTRUE);
34 }