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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 963 - (show annotations)
Tue Feb 13 04:05:13 2007 UTC (14 years, 7 months ago) by jongui
File MIME type: text/x-python
File size: 924 byte(s)
Added more examples and on-the-fly animation.
1 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
10 dc1.setFileName(file_name =
11 "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
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 s.animate()
27 mopc1.translate(0.05,0,0)

  ViewVC Help
Powered by ViewVC 1.1.26