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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1038 - (show annotations)
Fri Mar 16 05:15:37 2007 UTC (13 years, 3 months ago) by jongui
File MIME type: text/x-python
File size: 1170 byte(s)
Added more examples.
1 from esys.pyvisi import Scene, DataCollector, MapOnPlaneClip, 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
11 # NOTE: There is a difference between performing rotation then followed by
12 # translation and performing translation then followed by rotation.
13
14 # Create three map on clip instances.
15 mopc1_1 = MapOnPlaneClip(scene = s, data_collector = dc1,
16 viewport = Viewport.SOUTH_WEST)
17 mopc1_1.setPlaneToXY()
18 mopc1_1.rotateX(angle = 5)
19
20 mopc1_2 = MapOnPlaneClip(scene = s, data_collector = dc1,
21 viewport = Viewport.SOUTH_WEST)
22 mopc1_2.setPlaneToYZ(offset = 2.5)
23 mopc1_2.setOpacity(opacity = 0.5)
24
25 mopc1_3 = MapOnPlaneClip(scene = s, data_collector = dc1,
26 viewport = Viewport.SOUTH_WEST)
27 mopc1_3.setPlaneToXZ()
28 mopc1_3.rotateX(angle = -40)
29 mopc1_3.translate(x_offset = 0, y_offset = 2.2, z_offset = 0)
30
31 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
32 c1.isometricView()
33
34 s.render()

  ViewVC Help
Powered by ViewVC 1.1.26