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

Contents of /trunk/pyvisi/py_src/examples/ellipsoidonplanecut.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: 941 byte(s)
Added more examples.
1 from esys.pyvisi import Scene, DataCollector, EllipsoidOnPlaneCut, 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 one ellipsoid on plance cut instance.
15 eopc1 = EllipsoidOnPlaneCut(scene = s, data_collector = dc1,
16 viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
17 eopc1.setScaleFactor(scale_factor = 0.1)
18 eopc1.setPlaneToXY()
19 eopc1.rotateX(angle = 20)
20 eopc1.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