/[escript]/trunk/doc/examples/pyvisi/diffusion_with_pyvisi.py
ViewVC logotype

Diff of /trunk/doc/examples/pyvisi/diffusion_with_pyvisi.py

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

revision 1114 by jongui, Wed Apr 18 04:31:06 2007 UTC revision 1115 by jongui, Sun Apr 22 07:18:30 2007 UTC
# Line 8  from esys.pyvisi.constant import * Line 8  from esys.pyvisi.constant import *
8  PYVISI_EXAMPLE_IMAGES_PATH = "data_sample_images/"  PYVISI_EXAMPLE_IMAGES_PATH = "data_sample_images/"
9  X_SIZE = 400  X_SIZE = 400
10  Y_SIZE = 400  Y_SIZE = 400
11  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.DISPLAY
12    
13  #... set some parameters ...  #... set some parameters ...
14  xc=[0.02,0.002]  xc=[0.02,0.002]
# Line 40  s = Scene(renderer = JPG_RENDERER, x_siz Line 40  s = Scene(renderer = JPG_RENDERER, x_siz
40  # Create a DataCollector reading directly from escript objects.  # Create a DataCollector reading directly from escript objects.
41  dc = DataCollector(source = Source.ESCRIPT)  dc = DataCollector(source = Source.ESCRIPT)
42    
43    Map(scene = s, data_collector = dc,
44            viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,
45            cell_to_point = False, outline = True)
46    
47  # ... start iteration:  # ... start iteration:
48  while t<0.4*100:  while t<0.4*100:
49        i+=1        i+=1
# Line 50  while t<0.4*100: Line 54  while t<0.4*100:
54    
55        dc.setData(temp = T)        dc.setData(temp = T)
56        # Create a Map.        # Create a Map.
57        Map(scene = s, data_collector = dc,        #Map(scene = s, data_collector = dc,
58                viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,                #viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,
59                cell_to_point = False, outline = True)                #cell_to_point = False, outline = True)
60    
61        # Create a Camera.        # Create a Camera.
62        c= Camera(scene = s, data_collector = dc,        #c= Camera(scene = s, data_collector = dc,
63                viewport = Viewport.SOUTH_WEST)        #        viewport = Viewport.SOUTH_WEST)
64                
65        # Render the object.        # Render the object.
66        s.render(image_name = PYVISI_EXAMPLE_IMAGES_PATH +          s.render(image_name = PYVISI_EXAMPLE_IMAGES_PATH +  

Legend:
Removed from v.1114  
changed lines
  Added in v.1115

  ViewVC Help
Powered by ViewVC 1.1.26