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

Annotation of /trunk/pyvisi/py_src/examples/contouronplanecut.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 996 - (hide annotations)
Mon Feb 26 03:43:13 2007 UTC (13 years, 7 months ago) by jongui
File MIME type: text/x-python
File size: 864 byte(s)
Updated the drivers. Setting the active scalar/vector/tensor is now done in the DataCollector. i.e. 
dc = DataCollector(...)
dc.setFileName(...)
dc.setActiveScalar(...)

The use of setActiveScalar / setActiveVector / setActiveTensor have to be done after the setFileName.
1 jongui 962 from esys.pyvisi import Scene, DataCollector, ContourOnPlaneCut, 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/data/laurent/subduction/source/function.0271.vtk")
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 plane cut instance.
15 jongui 996 ctropc1 = ContourOnPlaneCut(scene = s, data_collector = dc1,
16 jongui 962 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
17 jongui 992 ctropc1.generateContours(contours = 8)
18     ctropc1.setPlaneToXY(offset = 200000)
19 jongui 962
20     c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
21 jongui 992 c1.elevation(angle = -45)
22 jongui 962
23     s.render()
24    

  ViewVC Help
Powered by ViewVC 1.1.26