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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 992 - (show annotations)
Fri Feb 23 03:35:33 2007 UTC (12 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 1557 byte(s)
Fix minor bugs in relation to setting the active scalar, vector and tensor for both the scaling and coloring options.
1 from esys.pyvisi import DataCollector, Map, Scene, Camera
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 dc = DataCollector(source = Source.XML)
8 dc.setFileName(file_name =
9 "/home/jongui/data/laurent/subduction/source/function.0271.vtk")
10
11 m = Map(scene = s, data_collector = dc, scalar = None,
12 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
13 m.setRepresentationToWireframe()
14
15 # Create a camera instance for the first viewport.
16 c = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST)
17 c.azimuth(angle = 50)
18
19 m2 = Map(scene = s, data_collector = dc, scalar = None,
20 viewport = Viewport.NORTH_WEST, lut = Lut.COLOR, outline = True)
21 m2.setColor(color = Color.BLUE)
22
23 # Create a camera instance for the second viewport.
24 c2 = Camera(scene = s, data_collector = dc, viewport = Viewport.NORTH_WEST)
25 c2.elevation(angle = 50)
26
27 m3 = Map(scene = s, data_collector = dc, scalar = None,
28 viewport = Viewport.NORTH_EAST, lut = Lut.GREY_SCALE, outline = True)
29
30 # Create a camera instance for the third viewport.
31 c3 = Camera(scene = s, data_collector = dc, viewport = Viewport.NORTH_EAST)
32 c3.isometricView()
33
34 m4 = Map(scene = s, data_collector = dc, scalar = None,
35 viewport = Viewport.SOUTH_EAST, lut = Lut.COLOR, outline = True)
36 m4.setOpacity(opacity = 0.7)
37
38 # Create a camera instance for the fourth viewport.
39 c4 = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_EAST)
40 c4.leftView()
41
42 s.render()

  ViewVC Help
Powered by ViewVC 1.1.26