#include using namespace std; void polyLineRefresh(Int_t n=5) { TCanvas *c1 = new TCanvas("c1","PolyLine3D",200,20,700,700); TPad *p1 = new TPad("p1","p1",0.1,0.1,0.9,0.9,0,4,1); //http://root.cern.ch/root/html/TView.html#TView:CreateView TView *view = TView::CreateView(1); //view = TView::CreateView(1); view->SetRange(-48,-48,-48,48,48,48); view->RotateView(90.0,0.0); TPolyLine3D *test = new TPolyLine3D(n); int col=1; test->SetLineColor(col); float r=10.0,x,y,z=0,theta; theta=0.0; string input; for(int i=0;iSetPoint(i,x,y,z); theta += 3.14159*2/n; test->Draw(); c1->Update(); //input=Getline("type increment color: "); cout << "type and then to increment color: "; cin >> input; if(input=="i"){ col++; test->SetLineColor(col); } } }