/[escript]/trunk/pyvisi/examples/escript_threeDVectorData2D.py
ViewVC logotype

Contents of /trunk/pyvisi/examples/escript_threeDVectorData2D.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 605 - (show annotations)
Mon Mar 20 07:16:27 2006 UTC (13 years, 7 months ago) by gross
File MIME type: text/x-python
File size: 730 byte(s)
pyvisi with vtk runs noe on the altix
1 #!/usr/bin/env python
2
3
4 # $Id: escript_threeDVectorData2D.py,v 1.3 2006/01/05 00:13:50 paultcochrane Exp $
5
6 from esys.escript import *
7 from esys import bruce
8
9 import numarray
10
11 from esys.pyvisi import *
12 from esys.pyvisi.renderers.vtk import *
13
14 online=False
15 tensorDomain = bruce.Rectangle(9,9,10,10)
16 tensorFunctionSpace=escript.ContinuousFunction(tensorDomain)
17
18 vectorData3D = numarray.array([1.0,2.0,3.0])
19
20 # plotting 3D vectors in a 2D array
21 threeDVectorData2D = Data(vectorData3D, tensorFunctionSpace, True)
22 scene = Scene()
23 plot = ArrowPlot3D(scene)
24 plot.setData(threeDVectorData2D)
25 if online: scene.render(pause=True)
26
27 scene.save(fname="escript_threeDVectorData2D_arrowPlot3D.png", format="png")
28
29 # vim: expandtab shiftwidth=4:

  ViewVC Help
Powered by ViewVC 1.1.26