forked from root-project/root
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathglplot.C
More file actions
34 lines (30 loc) · 917 Bytes
/
glplot.C
File metadata and controls
34 lines (30 loc) · 917 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/// \file
/// \ingroup tutorial_eve
/// Preliminary demo for showing Timur's GL plots in EVE.
///
/// \image html eve_glplot.png
/// \macro_code
///
/// \author Matevz Tadel
void glplot()
{
TEveManager::Create();
gEve->GetDefaultGLViewer()->SetCurrentCamera(TGLViewer::kCameraPerspXOY);
auto f2 = new TF2("f2","x**2 + y**2 - x**3 -8*x*y**4", -1., 1.2, -1.5, 1.5);
f2->SetFillColor(45);
auto x = new TEvePlot3D("EvePlot - TF2");
x->SetLogZ(kTRUE);
x->SetPlot(f2,"glsurf4");
x->RefMainTrans().MoveLF(2, 1);
gEve->AddElement(x);
auto h31 = new TH3F("h31", "h31", 10, -1, 1, 10, -1, 1, 10, -1, 1);
auto gxy = new TF3("gaus2","xygaus");
gxy->SetParameters(1,0,1,0,0.3);
h31->FillRandom("gaus2");
h31->SetFillColor(2);
x = new TEvePlot3D("EvePlot - TH3F");
x->SetPlot(h31, "glbox");
x->RefMainTrans().MoveLF(2, -1);
gEve->AddElement(x);
gEve->Redraw3D(kTRUE);
}