/[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 1053 - (show annotations)
Thu Mar 22 01:14:43 2007 UTC (14 years ago) by jongui
File MIME type: text/x-python
File size: 974 byte(s)
Removed the use of StructuredPointsProbe and replaced it with MaskPoints in the Velocity module. StructuredPointsProbe does NOT work well in all instances.
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(scale_factor = 800000)
17 vopc1.setPlaneToYZ()
18 vopc1.rotateY(angle = -70)
19 vopc1.translate(x_offset = 0, y_offset = 0, z_offset = 0.3)
20 vopc1.setRatio(10)
21 vopc1.randomOn()
22 #vopc1.setDimension(x = 7, y = 7, z = 7)
23
24 c = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
25 c.isometricView()
26
27 s.render()
28

  ViewVC Help
Powered by ViewVC 1.1.26