/[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 1069 - (show annotations)
Thu Mar 29 04:16:38 2007 UTC (12 years, 2 months ago) by jongui
File MIME type: text/x-python
File size: 1571 byte(s)
Perform some cleanup.
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 "/home/jongui/trunk/pyvisi/test/python/data_data/interior_2D.xml")
11
12 m = Map(scene = s, data_collector = dc,
13 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
14 m.setRepresentationToWireframe()
15
16 # Create a camera instance for the first viewport.
17 c = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_WEST)
18 c.azimuth(angle = 50)
19
20 m2 = Map(scene = s, data_collector = dc,
21 viewport = Viewport.NORTH_WEST, lut = Lut.COLOR, outline = True)
22 m2.setColor(color = Color.BLUE)
23
24 # Create a camera instance for the second viewport.
25 c2 = Camera(scene = s, data_collector = dc, viewport = Viewport.NORTH_WEST)
26 c2.elevation(angle = 50)
27
28 m3 = Map(scene = s, data_collector = dc,
29 viewport = Viewport.NORTH_EAST, lut = Lut.GREY_SCALE, outline = True)
30
31 # Create a camera instance for the third viewport.
32 c3 = Camera(scene = s, data_collector = dc, viewport = Viewport.NORTH_EAST)
33 c3.isometricView()
34
35 m4 = Map(scene = s, data_collector = dc,
36 viewport = Viewport.SOUTH_EAST, lut = Lut.COLOR, outline = True)
37 m4.setOpacity(opacity = 0.7)
38
39 # Create a camera instance for the fourth viewport.
40 c4 = Camera(scene = s, data_collector = dc, viewport = Viewport.SOUTH_EAST)
41 c4.leftView()
42
43 s.render()

  ViewVC Help
Powered by ViewVC 1.1.26