[vtkusers] Re: Please help me out on this one
Christopher M. Navarro
cnavarro at ncsa.uiuc.edu
Wed Feb 25 12:32:59 EST 2004
Hi Malcolm, David,
On Wed, 25 Feb 2004, Malcolm Drummond wrote:
> Hi David
>
> I was just about to post this ...
>
> To do what you want using existing vtkGlyph3D I think you'll have to create dummy vectors from one of your arrays - there is no provision at the moment to scale and color from different scalar arrays (I'd be happy to be proved wrong). The other easy alternative is to use vtkProgrammableGlyphFilter (have a look first at progGlyphs.tcl and progGlyphsBySource.tcl in graphics/tests/tcl and at the source code of vtkGlyph3D to see how glyphing is implemented).
>
> HTH
> Malcolm
I'm not sure if this would work but what if you did:
glyph->SetColorModeToColorByScalar();
glyph->SetScaleModeToScaleByVector();
then, associate your data appropriately....if all you have is scalar data
then you could fake it so one appears as a vector. ie, if I wanted to
scale the z direction I would do:
tuple 1: 1, 1, scalar
tuple 2: 1, 1, scalar
and so forth. I don't know if this would work but it might be worth a
shot.
regards,
chris
> ----- Original Message -----
> From: david michell
> To: malcolm at geovision.co.za
> Sent: Wednesday, February 25, 2004 5:43 PM
> Subject: Please help me out on this one
>
>
> Sir,
> I was looking through the archives for some help on Glyph3D and I came across your message.
> I have an unstructuredgrid of points, and I want to represent each point as a glyph(sphere).
> I have to arrays associated with the points, I want to use one array to scale the glyph and the other array to colour the glyph.
> How do I do that?
> Please help me out.
> Thanking you,
> David Michell
>
>
>
>
>
>
>
>
More information about the vtkusers
mailing list