Re: [ROOT] 3D Plot

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Jun 05 2001 - 11:52:45 MEST


A small example

//file pl3.C
void pl3() {
   TCanvas *c1 = new TCanvas("c1");
   TView *view = new TView(1);
   view->SetRange(0,0,0,2,2,2);
   const Int_t n = 100;
   TPolyLine3D *l = new TPolyLine3D(n);
   for (Int_t i=0;i<n;i++) {
      Double_t x = 2*gRandom->Rndm();
      Double_t y = 2*gRandom->Rndm();
      Double_t z = 2*gRandom->Rndm();
      l->SetPoint(i,x,y,z);
   }
   l->Draw();
}
      
root > .x pl3.C

Rene Brun

УАиИТ - САСУТП - Садре ев Айрат Алмазович wrote:
> 
> I'm new in ROOT and I'm confused with the variety ROOT's classes for 3D
> visualization.
> 
> I have a number of curves, each of it is defined by a series of 3d points
> (x, y, z). I need to plot all these curves on one plot with the means for
> rotating entire plot.
> 
> Tell me, please, does it possible to implement with ROOT?
> 
> Thank you.



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:48 MET