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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 963 - (show annotations)
Tue Feb 13 04:05:13 2007 UTC (13 years, 5 months ago) by jongui
File MIME type: text/x-python
File size: 822 byte(s)
Added more examples and on-the-fly animation.
1 from esys.pyvisi import Scene, DataCollector, MapOnScalarClip, Camera
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.OFFLINE_JPG, 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/data/laurent/subduction/source/function.0001.vtk")
10
11 # Create a map on scalar clip instance.
12 mosc1_1 = MapOnScalarClip(scene = s, data_collector = dc1, lut = Lut.GREY_SCALE)
13
14 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
15 c1.isometricView()
16
17 # Generate multiple images from multiple files.
18 for i in range(1,50):
19 print "Generating image", i
20 dc1.setFileName(file_name =
21 "/home/jongui/data/laurent/subduction/source/function.%04d.vtk" % i)
22 s.saveImage("output/%04d.jpg" % i)
23

  ViewVC Help
Powered by ViewVC 1.1.26