/[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 1038 - (show annotations)
Fri Mar 16 05:15:37 2007 UTC (13 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 826 byte(s)
Added more examples.
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 dc1.setActiveTensor(tensor = "stress_cell")
11
12 # Create one ellipsoid instance.
13 e1 = Ellipsoid(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,
14 lut = Lut.COLOR, outline = True)
15 e1.setScaleFactor(scale_factor = 0.1)
16 e1.setPhiResolution(resolution = 10)
17 e1.setThetaResolution(resolution = 10)
18 e1.setDimension(x = 2, y = 2, z = 2)
19
20 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
21 c1.isometricView()
22 c1.elevation(angle = -20)
23
24 s.render()
25

  ViewVC Help
Powered by ViewVC 1.1.26