[vtkusers] RE: VTK 4.4.x Windows binaries for Python 2.3?

Arnd Baecker arnd.baecker at web.de
Wed Dec 1 06:57:21 EST 2004


Hi,

I can only comment on one point (all others snipped ;-):

On Wed, 1 Dec 2004, Stephen McInerney wrote:

> Thanks Prabhu and Arnd, for the advice on Enthought edition.
> I installed it, everything works and looks very good, there aren't many
> examples though.

[...]

> * VTK: I am trying to figure out how to plot a vector field from an
> arbitrary function
> (without needing to dump a datafile and import into MayaVi)
> If anyone has a code snippet please let me know, esp. anything simple CFD or
> EM?
>
> * In VTK or Maya Vi, can I plot directly from a function or a data structure
> without needing to
> dump a data file?
> (As I recall MatLab allows you to plot anything directly from the
> *function*, it implicitly samples the function to a data structure with very
> sensible auto-determined limits, axes, coloring etc. This is an incredibly
> powerful feature - FYI.)

Have a look at Prabhu's imv.py which comes with MayaVi.
Under linux this is found under
  /usr/lib/python2.3/site-packages/mayavi/tools/imv.py
With this you can use

 1. surf(x, y, f) -- samples f along x, y and plots a surface.

 2. view(arr) -- Views array as structured points.

 3. viewi(arr) -- Views array as an image.

 4. sampler(xa, ya, func) -- Samples func along array of ordered
 points (xa, ya).


Best, Arnd



More information about the vtkusers mailing list