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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 962 - (show annotations)
Tue Feb 13 02:03:23 2007 UTC (13 years, 7 months ago) by jongui
File MIME type: text/x-python
File size: 1136 byte(s)
Added some examples.
1 from esys.pyvisi import DataCollector, Map, Scene
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.ONLINE, num_viewport = 4, x_size = 1000,
5 y_size = 800)
6
7 dc1 = DataCollector(source = Source.XML)
8 dc1.setFileName(file_name =
9 "/home/jongui/data/laurent/subduction/source/function.0271.vtk")
10
11 # Create a map instance for the first viewport.
12 m1 = Map(scene = s, data_collector = dc1, scalar = None,
13 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
14 m1.setRepresentationToWireframe()
15
16 # Create a map instance for the second viewport.
17 m2 = Map(scene = s, data_collector = dc1, scalar = None,
18 viewport = Viewport.NORTH_WEST, lut = Lut.COLOR, outline = True)
19 m2.setColor(Color.BLUE)
20
21 # Create a map instance for the third viewport.
22 m3 = Map(scene = s, data_collector = dc1, scalar = None,
23 viewport = Viewport.NORTH_EAST, lut = Lut.GREY_SCALE, outline = True)
24
25 # Create a map instance the fourth viewport.
26 m4 = Map(scene = s, data_collector = dc1, scalar = None,
27 viewport = Viewport.SOUTH_EAST, lut = Lut.COLOR, outline = True)
28 m4.setOpacity(0.5)
29
30 s.render()

  ViewVC Help
Powered by ViewVC 1.1.26