[vtkusers] Specifying glyphs at point location in world co-ordinates with values greater than 1

Elvis Dowson elvis.dowson at mac.com
Mon Nov 10 04:17:02 EST 2008


Hi,
          I am trying to specify glyphs at points locations in world  
co-ordinates as x=10, y=10, z=10, but it doesn't work.

If I specify the point locations as x=0.1, y=0.1, z=0.1, it works. It  
only appears to work when I give x,y, z in the range of 0 to 1.

It doesn't work for any other values greater than 1. The moment I  
specify a co-ordinate with a value greater than 1, I get a blank screen,

How can I specify the point location for the glyphs in world co- 
ordinates?

Best regards,

Elvis Dowson

# Create some points
vtkPoints points

# This does not work when values are greater than 1!! :-(
#   points InsertNextPoint 10 10 10
#   points InsertNextPoint 20 20 20

# This works!! Values are between 0 and 1
    points InsertNextPoint 0.10 0.10 0.10
    points InsertNextPoint 0.20 0.20 0.20

# Create glyphs to show the location of the points
#

# Create a polydata to be glyphed.
vtkPolyData polyDataPoints
   polyDataPoints SetPoints points

# Use sphere as glyph source.
vtkSphereSource balls
   balls SetRadius 0.02
   balls SetPhiResolution 10
   balls SetThetaResolution 10

vtkGlyph3D glyphPoints
   glyphPoints SetInput polyDataPoints
   glyphPoints SetSource [balls GetOutput]

vtkPolyDataMapper glyphMapper
   glyphMapper SetInputConnection [glyphPoints GetOutputPort]

vtkActor glyph
   glyph SetMapper glyphMapper
   eval   [glyph GetProperty] SetDiffuseColor $tomato
   [glyph GetProperty] SetSpecular .3
   [glyph GetProperty] SetSpecularPower 30



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081110/ff049f27/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Glyphs at point locations.jpg
Type: image/jpeg
Size: 14562 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081110/ff049f27/attachment.jpg>


More information about the vtkusers mailing list