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

Contents of /trunk/pyvisi/py_src/examples/contour.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: 735 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, Contour, Camera
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1000,
5 y_size = 800)
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 contour instance.
13 ctr1 = Contour(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,
14 lut = Lut.COLOR, outline = True)
15 ctr1.generateContours(contours = 1, lower_range = 0.5, upper_range = 0.5)
16
17 cam1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
18 cam1.elevation(angle = -40)
19
20 s.render()
21

  ViewVC Help
Powered by ViewVC 1.1.26