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

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

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

revision 1568 by ksteube, Sat May 24 03:15:08 2008 UTC revision 1569 by ksteube, Sat May 24 04:51:38 2008 UTC
# Line 8  Author: Ken Steube Line 8  Author: Ken Steube
8  from esys.pyvisi import Scene, DataCollector, Map, ImageReader, Image, Camera  from esys.pyvisi import Scene, DataCollector, Map, ImageReader, Image, Camera
9  from esys.pyvisi import GlobalPosition  from esys.pyvisi import GlobalPosition
10  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
11  import os  import os, sys
12    
13  PYVISI_EXAMPLE_MESHES_PATH = "data_meshes"  PYVISI_EXAMPLE_MESHES_PATH = "data_meshes"
14  PYVISI_EXAMPLE_IMAGES_PATH = "data_sample_images"  PYVISI_EXAMPLE_IMAGES_PATH = "data_sample_images"
# Line 24  JPG_RENDERER = Renderer.OFFLINE_JPG Line 24  JPG_RENDERER = Renderer.OFFLINE_JPG
24  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
25          y_size = Y_SIZE)          y_size = Y_SIZE)
26    
27    if not os.path.isfile("data_meshes/interior_3D.xml"):
28      print "Cannot find file data_meshes/interior_3D.xml"
29      sys.exit(1)
30    
31  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
32  dc1 = DataCollector(source = Source.XML)  dc1 = DataCollector(source = Source.XML)
33  dc1.setFileName(file_name = os.path.join(PYVISI_EXAMPLE_MESHES_PATH, FILE_3D))  dc1.setFileName(file_name = "data_meshes/interior_3D.xml")
34    
35  # Create a Map.  # Create a Map.
36  m1 = Map(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,  m1 = Map(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,

Legend:
Removed from v.1568  
changed lines
  Added in v.1569

  ViewVC Help
Powered by ViewVC 1.1.26