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

Annotation of /trunk/pyvisi/py_src/examples/seriesofcutsonline.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1084 - (hide annotations)
Thu Apr 12 05:19:22 2007 UTC (13 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 966 byte(s)
Updated the guide and fixed a minor bug with the use of the Camera.
1 jongui 1038 from esys.pyvisi import Scene, DataCollector, MapOnPlaneCut, 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     # Create two data collector instances.
8     dc1 = DataCollector(source = Source.XML)
9     dc1.setFileName(file_name =
10     "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
11     dc1.setActiveScalar(scalar = "temperature")
12    
13     # NOTE: There is a difference between performing rotation then followed by
14     # translation and performing translation then followed by rotation.
15    
16     # Create a map on plane cut instance for the first viewport.
17     mopc1 = MapOnPlaneCut(scene = s, data_collector = dc1,
18     viewport = Viewport.SOUTH_WEST)
19     mopc1.setPlaneToYZ(0.1)
20    
21     c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
22     c1.isometricView()
23    
24     # Animate multiple cuts from the translation.
25     for i in range(0, 60):
26 jongui 1084 s.render()
27 jongui 1038 mopc1.translate(0.05,0,0)

  ViewVC Help
Powered by ViewVC 1.1.26