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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1056 - (hide annotations)
Thu Mar 22 06:52:08 2007 UTC (13 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 958 byte(s)
Removed the use of StructuredPointsProbe and replaced it with MaskPoints in the Ellipsoid module. The masking of arrows and ellipsoids should now work for both point and cell data.
1 jongui 1038 from esys.pyvisi import Scene, DataCollector, VelocityOnPlaneCut
2     from esys.pyvisi.constant import *
3    
4     s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1152,
5     y_size = 864)
6    
7     dc1 = DataCollector(source = Source.XML)
8 jongui 1053 #dc1.setFileName(file_name =
9 jongui 1038 dc1.setFileName(file_name = "/home/jongui/data/laurent/slab/source/slab.xml")
10 jongui 1053 # "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
11     #dc1.setActiveVector("velocity_cell")
12 jongui 1038
13     # NOTE: There is a difference between performing rotation then followed by
14     # translation and performing translation then followed by rotation.
15    
16     # Create a velocity instance.
17     vopc1 = VelocityOnPlaneCut(scene = s, data_collector = dc1,
18 jongui 1053 arrow = Arrow.THREE_D, color_mode = ColorMode.VECTOR)
19     vopc1.setScaleFactor(scale_factor = 100000)
20     #vopc1.setPlaneToXY(50000)
21 jongui 1051 vopc1.setPlaneToXY()
22 jongui 1053 vopc1.setRatio(3)
23     vopc1.randomOn()
24 jongui 1056 vopc1.setRatio(25)
25 jongui 1051 #vopc1.setDimension(x = 4, y = 4, z = 4)
26 jongui 1038
27 jongui 1056
28 jongui 1038 s.render()
29    

  ViewVC Help
Powered by ViewVC 1.1.26