[vtkusers] Streamribbon

Jin-Teck Chu jtchu at iastate.edu
Wed Aug 30 15:49:05 EDT 2000


Greetings vtkusers,
I would like to verify whether I am creating the proper streamribbon to
represent vector vorticity and flow divergence.  I have tried to use the
vtkStreamline to generate the streamline and used the vtkRibbonFilter to
generate the streamribbon.  My question is whether the streamribbon
created by using vtkRibbonFilter includes the vorticity and divergence
of the streamline.

In the vtk textbook, it mentioned that we have to create 2 adjacent
streamlines and then bridging the lines with a polygonal mesh.  If it is
true, has anyone tried this method and able to show me how to do so.

The following is the method by using the vtkRibbonFilter I mentioned,
and can anyone please verify the method used is right or wrong?

Thank you.

vtkStreamLine *streamers = vtkStreamLine::New();
      streamers->SetInput( unsGrid->GetOutput( ) );
      streamers->SetStartPosition( x[0], x[1], x[2] );
      streamers->SetMaximumPropagationTime( maxTime );
      streamers->VorticityOn( );
      streamers->SetIntegrationStepLength( stepLength );
      streamers->SetStepLength( maxTime );
      streamers->SetNumberOfThreads( 10 );
      streamers->Update( );

vtkRibbonFilter *ribbonFilt = vtkRibbonFilter::New();
      ribbonFilt->SetInput( streamers->GetOutput( ) );
      ribbonFilt->VaryWidthOn( );
      ribbonFilt->SetWidthFactor( 0.005  );
      ribbonFilt->Update( );

vtkPolyDataNormals *ribbonNormals = vtkPolyDataNormals::New();
      ribbonNormals->SetInput( ribbonFilt->GetOutput( ) );

vtkPolyDataMapper *streamMapper = vtkPolyDataMapper::New();
     streamMapper->SetInput( ribbonNormals->GetOutput( ) );
     streamMapper->SetLookupTable( lut );
     streamMapper->SetScalarRange( range );

vtkActor *streamersActor = vtkActor::New( );
      streamersActor->SetMapper( streamMapper );






More information about the vtkusers mailing list