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

Diff of /trunk/pyvisi/py_src/examples/streamline.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1028 by jongui, Fri Feb 23 07:00:54 2007 UTC revision 1029 by jongui, Wed Mar 14 05:01:13 2007 UTC
# Line 12  dc1.setActiveScalar("scalar2") Line 12  dc1.setActiveScalar("scalar2")
12  # Create one streamline instance for the first viewport.  # Create one streamline instance for the first viewport.
13  sl1 = StreamLine(scene = s, data_collector = dc1,  sl1 = StreamLine(scene = s, data_collector = dc1,
14          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True,          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True,
15          color_mode = ColorMode.SCALAR)          color_mode = ColorMode.VECTOR)
16  sl1.setTubeRadius(radius = 0.01)  #sl1.setTubeRadius(radius = 0.01)
17    
18  cam1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)  cam1 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST)
19  cam1.elevation(angle = -40)  cam1.elevation(angle = -40)
20    
21    """
22  # Create one streamline instance for the second viewport.  # Create one streamline instance for the second viewport.
23  sl2 = StreamLine(scene = s, data_collector = dc1,  sl2 = StreamLine(scene = s, data_collector = dc1,
24          viewport = Viewport.NORTH_WEST, lut = Lut.COLOR, outline = True)          viewport = Viewport.NORTH_WEST, lut = Lut.COLOR, outline = True)
25  sl2.setPointSourceRadius(radius = 0.4)  #sl2.setPointSourceRadius(radius = 0.4)
26  sl2.setPointSourceNumberOfPoints(points = 5)  #sl2.setPointSourceNumberOfPoints(points = 5)
27  sl2.setTubeRadiusToVaryByScalar()  sl2.setTubeRadiusToVaryByScalar()
28    
29  cam2 = Camera(scene = s, data_collector = dc1, viewport = Viewport.NORTH_WEST)  cam2 = Camera(scene = s, data_collector = dc1, viewport = Viewport.NORTH_WEST)
30  cam2.elevation(angle = -40)  cam2.elevation(angle = -40)
31    """
32    
33  # Create one streamline instance for the third viewport.  # Create one streamline instance for the third viewport.
34    """
35  sl3 = StreamLine(scene = s, data_collector = dc1,  sl3 = StreamLine(scene = s, data_collector = dc1,
36          viewport = Viewport.NORTH_EAST, lut = Lut.COLOR, outline = True,          viewport = Viewport.NORTH_EAST, lut = Lut.COLOR, outline = True,
37          color_mode = ColorMode.SCALAR)          color_mode = ColorMode.SCALAR)
# Line 37  sl3.setPointSourceCenter(GlobalPosition( Line 40  sl3.setPointSourceCenter(GlobalPosition(
40    
41  cam3 = Camera(scene = s, data_collector = dc1, viewport = Viewport.NORTH_EAST)  cam3 = Camera(scene = s, data_collector = dc1, viewport = Viewport.NORTH_EAST)
42  cam3.elevation(angle = -60)  cam3.elevation(angle = -60)
43    """
44    
45    """
46  # Create one streamline instance for the fourth viewport.  # Create one streamline instance for the fourth viewport.
47  sl4 = StreamLine(scene = s, data_collector = dc1,  sl4 = StreamLine(scene = s, data_collector = dc1,
48          viewport = Viewport.SOUTH_EAST, lut = Lut.COLOR, outline = True)          viewport = Viewport.SOUTH_EAST, lut = Lut.COLOR, outline = True)
# Line 47  sl4.setMaximumPropagationTime(100) Line 52  sl4.setMaximumPropagationTime(100)
52    
53  cam4 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_EAST)  cam4 = Camera(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_EAST)
54  cam4.elevation(angle = -60)  cam4.elevation(angle = -60)
55    """
56  s.render()  s.render()
57    

Legend:
Removed from v.1028  
changed lines
  Added in v.1029

  ViewVC Help
Powered by ViewVC 1.1.26