[vtkusers] Mesh visualization
Stefano Perticoni
stperti at infinito.it
Wed Jul 5 04:29:04 EDT 2000
Hi ! :o)
I have an unstructured grid composed of triangles only.
If i try to see the mesh using this tcl program the lines of the
triangles overlap and i don't see a clear mesh. :o(
I converted the dataset from an avs input file. The
rapresentation with points only is ok.
Thanks in advance :o)
Stefano Perticoni from Italy
# create reader
vtkUnstructuredGridReader reader
reader SetFileName "$VTK_DATA/unstrgrid.vtk"
reader SetScalarsName "Depth"
vtkGeometryFilter polyreader
polyreader SetInput [reader GetOutput]
vtkLookupTable lut
lut SetHueRange 0.0 0.66667
vtkPolyDataMapper polymapper
polymapper SetInput [polyreader GetOutput]
polymapper SetLookupTable lut
polymapper SetScalarRange 0 50
# Add the actors to the renderer, set the background and size
vtkActor polyactor
polyactor SetMapper polymapper
[polyactor GetProperty] SetColor .2 .2 .2
[polyactor GetProperty] SetRepresentationToWireframe
#[polyactor GetProperty] SetRepresentationToPoints
#[polyactor GetProperty] SetRepresentationToSurface
# Create graphics stuff
vtkRenderer ren1
vtkRenderWindow renWin
renWin AddRenderer ren1
vtkRenderWindowInteractor iren
iren SetRenderWindow renWin
ren1 AddActor polyactor
[ren1 GetActiveCamera] Azimuth 60
[ren1 GetActiveCamera] Roll -90
[ren1 GetActiveCamera] Dolly 2
ren1 ResetCameraClippingRange
ren1 SetBackground .5 .5 .5
renWin SetSize 400 400
iren Initialize
#renWin SetFileName "blow.tcl.ppm"
#renWin SaveImageAsPPM
# prevent the tk window from showing up then start the event loop
wm withdraw .
More information about the vtkusers
mailing list