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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 988 - (show annotations)
Tue Feb 20 07:21:12 2007 UTC (12 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 759 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, Ellipsoid, 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/trunk/pyvisi/test/python/data_data/interior_3D.xml")
10
11 # Create one ellipsoid instance.
12 e1 = Ellipsoid(scene = s, data_collector = dc1, tensor = "stress_cell",
13 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
14 e1.setScaleFactor(scale_factor = 0.1)
15 e1.setPhiResolution(10)
16 e1.setThetaResolution(10)
17 e1.setDimension(2,2,2)
18
19 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
20 c1.isometricView()
21 c1.elevation(-20)
22
23 s.render()
24

  ViewVC Help
Powered by ViewVC 1.1.26