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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 992 - (show annotations)
Fri Feb 23 03:35:33 2007 UTC (13 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 899 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 Scene, DataCollector, ContourOnPlaneClip, Camera
2 from esys.pyvisi.constant import *
3
4 s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1000,
5 y_size = 800)
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 one contour on plance clip instance.
15 ctropc1 = ContourOnPlaneClip(scene = s, data_collector = dc1, scalar = None,
16 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
17 ctropc1.setPlaneToXY()
18 ctropc1.rotateY(angle = 20)
19 ctropc1.generateContours(contours = 8)
20
21 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
22 c1.elevation(angle = -40)
23
24 s.render()
25

  ViewVC Help
Powered by ViewVC 1.1.26