11from ROOT 
import TCanvas, TView, TPolyMarker3D, TPaveText
 
   12from ROOT 
import gROOT, gBenchmark
 
   13from math 
import cos, sin, pi
 
   15gBenchmark.Start( 
'tornado' )
 
   22sky = 
TCanvas( 
'sky', 
'Tornado', 300, 10, 700, 500 )
 
   27rng = numberOfCircles * d
 
   28view.SetRange( 0, 0, 0, 4.0*rng, 2.0*rng, rng )
 
   31for j 
in range( d, numberOfCircles * d, d ):
 
   37   for i 
in range( 1, numberOfPoints ) :
 
   38      csin = 
sin( 2*pi / numberOfPoints * i ) + 1
 
   39      ccos = 
cos( 2*pi / numberOfPoints  * i ) + 1
 
   40      esin = 
sin( 2*pi / (numberOfCircles*d) * j ) + 1
 
   41      x = j * ( csin + esin );
 
   44      pm3d.SetPoint( i, x, y, z );
 
   47   pm3d.SetMarkerSize( 1 )
 
   48   pm3d.SetMarkerColor( 2 + ( d == ( j & d ) ) )
 
   49   pm3d.SetMarkerStyle( 3 )
 
   55   polymarkers.append( pm3d )
 
   57gBenchmark.Show( 
'tornado' )
 
   59ct = gBenchmark.GetCpuTime( 
'tornado' )
 
   60timeStr = 
'Execution time: %g sec.' % ct
 
   63text.SetFillColor( 42 )
 
   64text.AddText( 
'PyROOT example: tornado.py' )
 
   65text.AddText( timeStr )
 
A Pave (see TPave) with text, lines or/and boxes inside.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.