glplot.C

Go to the documentation of this file.
00001 // Preliminary demo for showing Timur's GL plots in EVE.
00002 // Author: Matevz Tadel, July 2009
00003 
00004 void glplot()
00005 {
00006    TEveManager::Create();
00007    gEve->GetDefaultGLViewer()->SetCurrentCamera(TGLViewer::kCameraPerspXOY);
00008 
00009    TF2 *f2 = new TF2("f2","x**2 + y**2 - x**3 -8*x*y**4", -1., 1.2, -1.5, 1.5);
00010    f2->SetFillColor(45);
00011    x = new TEvePlot3D("EvePlot - TF2");
00012    x->SetLogZ(kTRUE);
00013    x->SetPlot(f2,"glsurf4");
00014    x->RefMainTrans().MoveLF(2, 1);
00015    gEve->AddElement(x);
00016 
00017 
00018    TH3F *h31 = new TH3F("h31", "h31", 10, -1, 1, 10, -1, 1, 10, -1, 1);
00019    h31->FillRandom("gaus");
00020    h31->SetFillColor(2);
00021    x = new TEvePlot3D("EvePlot - TH3F");
00022    x->SetPlot(h31, "glbox");
00023    x->RefMainTrans().MoveLF(2, -1);
00024    gEve->AddElement(x);
00025 
00026    gEve->Redraw3D(kTRUE);
00027 }

Generated on Tue Jul 5 15:43:50 2011 for ROOT_528-00b_version by  doxygen 1.5.1