/[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 1056 - (show annotations)
Thu Mar 22 06:52:08 2007 UTC (12 years, 4 months ago) by jongui
File MIME type: text/x-python
File size: 856 byte(s)
Removed the use of StructuredPointsProbe and replaced it with MaskPoints in the Ellipsoid module. The masking of arrows and ellipsoids should now work for both point and cell data.
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.setRatio(8)
19 e1.randomOn()
20 #e1.setDimension(x = 2, y = 2, z = 2)
21
22 c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
23 c1.isometricView()
24 c1.elevation(angle = -20)
25
26 s.render()
27

  ViewVC Help
Powered by ViewVC 1.1.26