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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 988 - (show annotations)
Tue Feb 20 07:21:12 2007 UTC (12 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 865 byte(s)
Both point and cell data should now work properly with Pyvisi. Some testing have been done but a more extensive test will be done at a later stage.
1 from esys.pyvisi import Scene, DataCollector, VelocityOnPlaneClip, Camera
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 dc1.setFileName(file_name = "/home/jongui/data/laurent/slab/source/slab.xml")
9
10 # NOTE: There is a difference between performing rotation then followed by
11 # translation and performing translation then followed by rotation.
12
13 # Create a velocity on plane clip instance.
14 vopc1 = VelocityOnPlaneClip(scene = s, data_collector = dc1,
15 arrow = Arrow.THREE_D, color_mode = ColorMode.SCALAR)
16 vopc1.setScaleFactor(200000)
17 vopc1.setPlaneToYZ()
18 vopc1.rotateY(-70)
19 vopc1.translate(0,0,0.3)
20 vopc1.setDimension(7,7,7)
21
22 c = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
23 c.isometricView()
24
25 s.render()
26

  ViewVC Help
Powered by ViewVC 1.1.26