/[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 1038 - (show annotations)
Fri Mar 16 05:15:37 2007 UTC (12 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 937 byte(s)
Added more examples.
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 = 200000)
17 vopc1.setPlaneToYZ()
18 vopc1.rotateY(angle = -70)
19 vopc1.translate(x_offset = 0, y_offset = 0, z_offset = 0.3)
20 vopc1.setDimension(x = 7, y = 7, z = 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