Logo ROOT   6.07/09
Reference Guide
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 {
14 
15  TF2 *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  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 
24  TH3F *h31 = new TH3F("h31", "h31", 10, -1, 1, 10, -1, 1, 10, -1, 1);
25  h31->FillRandom("gaus");
26  h31->SetFillColor(2);
27  x = new TEvePlot3D("EvePlot - TH3F");
28  x->SetPlot(h31, "glbox");
29  x->RefMainTrans().MoveLF(2, -1);
30  gEve->AddElement(x);
31 
33 }
virtual void FillRandom(const char *fname, Int_t ntimes=5000)
Fill histogram following distribution in function fname.
Definition: TH3.cxx:658
tomato 3-D histogram with a float per channel (see TH1 documentation)}
Definition: TH3.h:271
void Redraw3D(Bool_t resetCameras=kFALSE, Bool_t dropLogicals=kFALSE)
Definition: TEveManager.h:168
void AddElement(TEveElement *element, TEveElement *parent=0)
Add an element.
Double_t x[n]
Definition: legend1.C:17
static TEveManager * Create(Bool_t map_window=kTRUE, Option_t *opt="FIV")
If global TEveManager* gEve is not set initialize it.
Description of TEvePlot3D.
Definition: TEvePlot3D.h:18
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
Definition: TAttFill.h:42
R__EXTERN TEveManager * gEve
Definition: TEveManager.h:243
A 2-Dim function with parameters.
Definition: TF2.h:33
TGLViewer * GetDefaultGLViewer() const
Get TGLViewer of the default TEveViewer.
void SetCurrentCamera(ECameraType camera)
Set current active camera - 'cameraType' one of: kCameraPerspX, kCameraPerspY, kCameraPerspZ, kCameraOrthoXOY, kCameraOrthoXOZ, kCameraOrthoZOY, kCameraOrthoXnOY, kCameraOrthoXnOZ, kCameraOrthoZnOY.
Definition: TGLViewer.cxx:1786
THist< 3, float, THistStatContent, THistStatUncertainty > TH3F
Definition: THist.hxx:314
double f2(const double *x)
const Bool_t kTRUE
Definition: Rtypes.h:91