[vtkusers] Plot points in space & render pressure cloud?

Adriano Tittarelli gneotel at tin.it
Mon Dec 16 12:03:58 EST 2002


Hi all,
I'm very new to vtk.
2 questions for you:

1)
I wonder which is the best way to plot points in 3d space.

I've got a data file foo.dat like this:
********************
 -.200000E+01 -.200000E+01 -.200000E+01
  0.00000E+00
 -.200000E+01 -.200000E+01 -.190000E+01
  0.00000E+00
.........
.........
********************

and I read it this way:

********************
vtkFloatArray scalars
vtkPoints points

   set file [open "foo.dat" r]
   while { [gets $file line] != -1 } {
      scan $line "%f %f %f" x y z
      scan $line "%f" q
      if {($q > 0)}

      points InsertNextPoint $x $y $z
      scalars InsertTuple1 [expr [points GetNumberOfPoints] - 1] $q
      }
   }

vtkPolyData onda
      onda SetPoints points
      [onda GetPointData] SetScalars scalars
...........
...........
*********************

How can I plot onda points?

2)
How can I render them not as separate points but as a uniform transparent 3D
cloud?
(Points scalars represent pressure in that point)

Thanks in advance,
Merry Xmas, Adriano





More information about the vtkusers mailing list