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

Annotation of /trunk/pyvisi/py_src/examples/ellipsoidonplaneclip.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1056 - (hide annotations)
Thu Mar 22 06:52:08 2007 UTC (13 years, 6 months ago) by jongui
File MIME type: text/x-python
File size: 976 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 jongui 1038 from esys.pyvisi import Scene, DataCollector, EllipsoidOnPlaneClip, 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 =
9     "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
10    
11     # NOTE: There is a difference between performing rotation then followed by
12     # translation and performing translation then followed by rotation.
13    
14     # Create on ellipsoid on plane clip instance.
15     eopc = EllipsoidOnPlaneClip(scene = s, data_collector = dc1,
16     viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
17     eopc.setScaleFactor(scale_factor = 0.1)
18     eopc.setPlaneToXY()
19 jongui 1056 eopc.rotateX(angle = 30)
20     #eopc.setRatio(10)
21     #eopc.setDimension(x = 2,y = 2, z = 2)
22 jongui 1038
23     c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
24     c1.bottomView()
25     c1.azimuth(angle = -90)
26     c1.elevation(angle = 20)
27    
28     s.render()
29    

  ViewVC Help
Powered by ViewVC 1.1.26