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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1057 - (hide annotations)
Thu Mar 22 23:57:37 2007 UTC (13 years, 7 months ago) by jongui
File MIME type: text/x-python
File size: 1942 byte(s)
The use of StructuredPoints and Probe filter have been removed and replaced with MaskPoints completely. The use of the method 'setDimension' is no longer valid and should be replace with 'setRatio'.
1 jongui 1038 from esys.pyvisi import Scene, DataCollector, MapOnPlaneCut, Camera
2     from esys.pyvisi import VelocityOnPlaneCut, StreamLine, EllipsoidOnPlaneCut
3     from esys.pyvisi import ContourOnPlaneClip, Text2D, LocalPosition
4     from esys.pyvisi.constant import *
5    
6     s = Scene(renderer = Renderer.ONLINE, num_viewport = 1, x_size = 1152,
7     y_size = 864)
8    
9     dc1 = DataCollector(source = Source.XML)
10     dc1.setFileName(file_name =
11     "/home/jongui/trunk/pyvisi/test/python/data_data/interior_3D.xml")
12    
13     mopc1 = MapOnPlaneCut(scene = s, data_collector = dc1,
14     viewport = Viewport.SOUTH_WEST)
15     mopc1.setPlaneToXY()
16    
17     vopc1 = VelocityOnPlaneCut(scene = s, data_collector = dc1,
18     arrow = Arrow.THREE_D, color_mode = ColorMode.SCALAR)
19     vopc1.setScaleFactor(scale_factor = 0.2)
20     vopc1.setPlaneToYZ(offset = 2.999)
21 jongui 1057 #vopc1.setDimension(x = 1.5, y = 1.5, z = 1.5)
22     vopc1.setRatio(2)
23 jongui 1038
24     sl1 = StreamLine(scene = s, data_collector = dc1,
25     viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True,
26     color_mode = ColorMode.SCALAR)
27     sl1.setTubeRadius(radius = 0.02)
28    
29     eopc1 = EllipsoidOnPlaneCut(scene = s, data_collector = dc1,
30     viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
31     eopc1.setScaleFactor(scale_factor = 0.1)
32     eopc1.setPlaneToXZ()
33     eopc1.rotateX(angle = -40)
34     eopc1.translate(x_offset = 0, y_offset = 0.2, z_offset = 0)
35 jongui 1057 #eopc1.setDimension(x = 1, y = 1, z = 1)
36     eopc1.setRatio(2)
37 jongui 1038
38     ctropc1 = ContourOnPlaneClip(scene = s, data_collector = dc1,
39     viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True)
40     ctropc1.setPlaneToXY()
41     ctropc1.rotateY(angle = 10)
42     ctropc1.generateContours(contours = 3)
43    
44     t1 = Text2D(scene = s, viewport = Viewport.SOUTH_WEST, text = "Pyvisi")
45     t1.setPosition(LocalPosition(x_coor = 530, y_coor = 30))
46     t1.setColor(color = Color.BLACK)
47     t1.setFontSize(size = 30)
48     t1.boldOn()
49    
50     c1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
51     c1.isometricView()
52    
53     s.render()

  ViewVC Help
Powered by ViewVC 1.1.26