/[escript]/trunk/pyvisi/py_src/examples/carpet.py
ViewVC logotype

Contents of /trunk/pyvisi/py_src/examples/carpet.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 994 - (show annotations)
Fri Feb 23 07:00:54 2007 UTC (12 years, 2 months ago) by jongui
File MIME type: text/x-python
File size: 677 byte(s)
Modified the way setActiveScalar, setActiveVector and setActiveTensor are specified. It appears that the attributes have to be set each time a new file is read.
1 from esys.pyvisi import Scene, DataCollector, Carpet, Camera
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1152,
5 y_size = 864)
6
7 dc1 = DataCollector(source = Source.XML)
8 dc1.setFileName(file_name =
9 "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
10 dc1.setActiveScalar(scalar = "temperature_cell")
11
12 # Create one carpet instance.
13 cpt1 = Carpet(scene = s, data_collector = dc1, warp_mode = WarpMode.VECTOR,
14 lut = Lut.COLOR)
15 cpt1.setPlaneToXY(0.5)
16 cpt1.setScaleFactor(0.5)
17
18 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
19 c1.isometricView()
20
21 s.render()
22

  ViewVC Help
Powered by ViewVC 1.1.26