/[escript]/trunk/doc/user/pyvisi.tex
ViewVC logotype

Diff of /trunk/doc/user/pyvisi.tex

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

revision 3292 by caltinay, Fri Oct 15 04:02:06 2010 UTC revision 3293 by caltinay, Thu Oct 21 23:18:32 2010 UTC
# Line 12  Line 12 
12  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13    
14    
15  \chapter{The Module \pyvisi}  \chapter{The \pyvisi Module}\label{PYVISI CHAP}
 \label{PYVISI CHAP}  
16  \declaremodule{extension}{esys.pyvisi}  \declaremodule{extension}{esys.pyvisi}
17  \modulesynopsis{Python Visualization Interface}  \modulesynopsis{Python Visualization Interface}
18    
# Line 23  Line 22 
22  \strong{\begin{Large}Warning: The Module \pyvisi is not supported under MPI        \end{Large}.}  \strong{\begin{Large}Warning: The Module \pyvisi is not supported under MPI        \end{Large}.}
23    
24  \section{Introduction}  \section{Introduction}
25  \pyvisi is a Python module that is used to generate 2D and 3D visualizations  \pyvisi is a Python module that is used to generate 2D and 3D visualizations
26  for escript and its PDE solver finley. The module provides  for escript and its PDE solver finley. The module provides
27  an easy to use interface to the \VTK library (\VTKUrl) to render (generate)  an easy to use interface to the \VTK library (\VTKUrl) to render (generate)
28  surface maps and contours for scalar fields, arrows and streamlines for vector  surface maps and contours for scalar fields, arrows and streamlines for vector
29  fields, and ellipsoids for tensor fields. There are three approaches for  fields, and ellipsoids for tensor fields. There are three approaches for
# Line 39  The following outlines the general steps Line 38  The following outlines the general steps
38    
39  \begin{enumerate}  \begin{enumerate}
40  \item Create a \Scene instance - a window in which objects will be rendered on.  \item Create a \Scene instance - a window in which objects will be rendered on.
41  \item Create a data input instance (i.e. \DataCollector or \ImageReader) -  \item Create a data input instance (i.e. \DataCollector or \ImageReader) -
42  reads the source data for visualization.  reads the source data for visualization.
43  \item Create a data visualization object (i.e. \Map, \Velocity, \Ellipsoid,  \item Create a data visualization object (i.e. \Map, \Velocity, \Ellipsoid,
44  \Contour, \Carpet, \StreamLine, etc.) - creates a visual representation of  \Contour, \Carpet, \StreamLine, etc.) - creates a visual representation of
45  the source data.  the source data.
46  \item Create a \Camera or \Light instance - controls the viewing angle and  \item Create a \Camera or \Light instance - controls the viewing angle and
# Line 51  lighting effects. Line 50  lighting effects.
50  \end{enumerate}  \end{enumerate}
51  \begin{center}  \begin{center}
52  \begin{math}  \begin{math}
53  scene \rightarrow data \; input \rightarrow data \; visualization \rightarrow  scene \rightarrow data \; input \rightarrow data \; visualization \rightarrow
54  camera \, / \, light \rightarrow render \rightarrow movie  camera \, / \, light \rightarrow render \rightarrow movie
55  \end{math}  \end{math}
56  \end{center}  \end{center}
57    
58  \section{\pyvisi Classes}  \section{\pyvisi Classes}
59  The following subsections give a brief overview of the important classes  The following subsections give a brief overview of the important classes
60  and some of their corresponding methods. Please refer to \ReferenceGuide for  and some of their corresponding methods. Please refer to \ReferenceGuide for
61  full details.  full details.
62    
63    
# Line 70  This section details the instances used Line 69  This section details the instances used
69    
70  \subsubsection{\Scene class}  \subsubsection{\Scene class}
71    
72  \begin{classdesc}{Scene}{renderer = Renderer.ONLINE, num_viewport = 1,  \begin{classdesc}{Scene}{renderer = Renderer.ONLINE, num_viewport = 1,
73  x_size = 1152, y_size = 864}  x_size = 1152, y_size = 864}
74  A scene is a window in which objects are to be rendered on. Only  A scene is a window in which objects are to be rendered on. Only
75  one scene needs to be created. However, a scene may be divided into four  one scene needs to be created. However, a scene may be divided into four
76  smaller windows called viewports (if needed). Each viewport in turn can  smaller windows called viewports (if needed). Each viewport in turn can
77  render a different object.  render a different object.
78  \end{classdesc}  \end{classdesc}
79    
80  The following are some of the methods available:  The following are some of the methods available:
# Line 90  Render the object using either the Onlin Line 89  Render the object using either the Onlin
89  \subsubsection{\Camera class}  \subsubsection{\Camera class}
90    
91  \begin{classdesc}{Camera}{scene, viewport = Viewport.SOUTH_WEST}  \begin{classdesc}{Camera}{scene, viewport = Viewport.SOUTH_WEST}
92  A camera controls the display angle of the rendered object and one is  A camera controls the display angle of the rendered object and one is
93  usually created for a \Scene. However, if a \Scene has four viewports, then a  usually created for a \Scene. However, if a \Scene has four viewports, then a
94  separate camera may be created for each viewport.  separate camera may be created for each viewport.
95  \end{classdesc}  \end{classdesc}
96    
97  The following are some of the methods available:  The following are some of the methods available:
# Line 145  method. Line 144  method.
144  \subsubsection{\Light class}  \subsubsection{\Light class}
145    
146  \begin{classdesc}{Light}{scene, viewport = Viewport.SOUTH_WEST}  \begin{classdesc}{Light}{scene, viewport = Viewport.SOUTH_WEST}
147  A light controls the lighting effect for the rendered object and is set up in  A light controls the lighting effect for the rendered object and is set up in
148  a similar way to \Camera.  a similar way to \Camera.
149  \end{classdesc}  \end{classdesc}
150    
# Line 178  for visualization. Line 177  for visualization.
177    
178  \subsubsection{\DataCollector class}  \subsubsection{\DataCollector class}
179  \begin{classdesc}{DataCollector}{source = Source.XML}  \begin{classdesc}{DataCollector}{source = Source.XML}
180  A data collector is used to read data either from an XML file (using  A data collector is used to read data either from an XML file (using
181  \texttt{setFileName()}) or from an escript object directly (using  \texttt{setFileName()}) or from an escript object directly (using
182  \texttt{setData()}). Writing XML files is expensive but has the advantage  \texttt{setData()}). Writing XML files is expensive but has the advantage
183  that the results can be analyzed easily after the simulation has completed.    that the results can be analyzed easily after the simulation has completed.
184  \end{classdesc}  \end{classdesc}
185    
186  The following are some of the methods available:  The following are some of the methods available:
# Line 190  Set the XML file name to read. Line 189  Set the XML file name to read.
189  \end{methoddesc}  \end{methoddesc}
190    
191  \begin{methoddesc}[DataCollector]{setData}{**args}  \begin{methoddesc}[DataCollector]{setData}{**args}
192  Create data using the \textless name\textgreater=\textless data\textgreater  Create data using the \textless name\textgreater=\textless data\textgreater
193  pairing. The method assumes that the data is given in the appropriate format.  pairing. The method assumes that the data is given in the appropriate format.
194  \end{methoddesc}  \end{methoddesc}
195    
# Line 237  Use bold font style for the text. Line 236  Use bold font style for the text.
236  Set the color of the 2D text.  Set the color of the 2D text.
237  \end{methoddesc}  \end{methoddesc}
238    
239  Including methods from \ActorTwoD.  Including methods from \ActorTwoD.
240    
241    
242  %##############################################################################  %##############################################################################
# Line 251  data. The typical usage of some of the c Line 250  data. The typical usage of some of the c
250  One point to note is that the source can either be point or cell data. If the  One point to note is that the source can either be point or cell data. If the
251  source is cell data, a conversion to point data may or may not be  source is cell data, a conversion to point data may or may not be
252  required, in order for the object to be rendered correctly.  required, in order for the object to be rendered correctly.
253  If a conversion is needed, the 'cell_to_point' flag (see below) must  If a conversion is needed, the 'cell_to_point' flag (see below) must
254  be set to 'True', otherwise to 'False' (which is the default). On occasions, an  be set to 'True', otherwise to 'False' (which is the default). On occasions, an
255  inaccurate object may be rendered from cell data even after conversion.  inaccurate object may be rendered from cell data even after conversion.
256    
257  \subsubsection{\Map class}  \subsubsection{\Map class}
258    
259  \begin{classdesc}{Map}{scene, data_collector,  \begin{classdesc}{Map}{scene, data_collector,
260  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
261  outline = True}  outline = True}
262  Class that shows a scalar field on a domain surface. The domain surface  Class that shows a scalar field on a domain surface. The domain surface
263  can either be color or gray-scale, depending on the lookup table used.  can either be color or gray-scale, depending on the lookup table used.
264  \end{classdesc}  \end{classdesc}
265    
# Line 291  IMAGE_NAME = "map.jpg" Line 290  IMAGE_NAME = "map.jpg"
290  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
291    
292  # Create a Scene with four viewports.  # Create a Scene with four viewports.
293  s = Scene(renderer = JPG_RENDERER, num_viewport = 4, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 4, x_size = X_SIZE,
294          y_size = Y_SIZE)          y_size = Y_SIZE)
295    
296  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
# Line 300  dc1.setFileName(file_name = os.path.join Line 299  dc1.setFileName(file_name = os.path.join
299  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA)  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA)
300    
301  # Create a  Map for the first viewport.  # Create a  Map for the first viewport.
302  m1 = Map(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,  m1 = Map(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,
303          lut = Lut.COLOR, cell_to_point = False, outline = True)          lut = Lut.COLOR, cell_to_point = False, outline = True)
304  m1.setRepresentationToWireframe()  m1.setRepresentationToWireframe()
305    
# Line 315  dc2.setFileName(file_name = os.path.join Line 314  dc2.setFileName(file_name = os.path.join
314  dc2.setActiveScalar(scalar = SCALAR_FIELD_CELL_DATA)  dc2.setActiveScalar(scalar = SCALAR_FIELD_CELL_DATA)
315    
316  # Create a Map for the third viewport.  # Create a Map for the third viewport.
317  m2 = Map(scene = s, data_collector = dc2, viewport = Viewport.NORTH_EAST,  m2 = Map(scene = s, data_collector = dc2, viewport = Viewport.NORTH_EAST,
318          lut = Lut.COLOR, cell_to_point = True, outline = True)          lut = Lut.COLOR, cell_to_point = True, outline = True)
319    
320  # Create a Camera for the third viewport  # Create a Camera for the third viewport
# Line 327  s.render(image_name = os.path.join(PYVIS Line 326  s.render(image_name = os.path.join(PYVIS
326    
327  \subsubsection{\MapOnPlaneCut class}  \subsubsection{\MapOnPlaneCut class}
328    
329  \begin{classdesc}{MapOnPlaneCut}{scene, data_collector,  \begin{classdesc}{MapOnPlaneCut}{scene, data_collector,
330  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
331  outline = True}  outline = True}
332  This class works in a similar way to \Map, except that the result is a slice of  This class works in a similar way to \Map, except that the result is a slice of
333  the scalar field produced by cutting the map with a plane. The plane can be  the scalar field produced by cutting the map with a plane. The plane can be
# Line 341  Methods from \ActorThreeD, \Transform an Line 340  Methods from \ActorThreeD, \Transform an
340  \subsubsection{\MapOnPlaneClip class}  \subsubsection{\MapOnPlaneClip class}
341    
342  \begin{classdesc}{MapOnPlaneClip}{scene, data_collector,  \begin{classdesc}{MapOnPlaneClip}{scene, data_collector,
343  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
344  outline = True}  outline = True}
345  This class works in a similar way to \MapOnPlaneCut, except that the defined  This class works in a similar way to \MapOnPlaneCut, except that the defined
346  plane is used to clip the scalar field.  plane is used to clip the scalar field.
# Line 352  Methods from \ActorThreeD, \Transform, \ Line 351  Methods from \ActorThreeD, \Transform, \
351    
352  \subsubsection{\MapOnScalarClip class}  \subsubsection{\MapOnScalarClip class}
353    
354  \begin{classdesc}{MapOnScalarClip}{scene, data_collector,  \begin{classdesc}{MapOnScalarClip}{scene, data_collector,
355  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
356  outline = True}  outline = True}
357  This class works in a similar way to \Map, except that it only shows parts of  This class works in a similar way to \Map, except that it only shows parts of
358  the scalar field matching a scalar value.  the scalar field matching a scalar value.
359  \end{classdesc}  \end{classdesc}
360    
361  The following are some of the methods available:\\  The following are some of the methods available:\\
# Line 364  Methods from \ActorThreeD, \Clipper and Line 363  Methods from \ActorThreeD, \Clipper and
363    
364  \subsubsection{\MapOnScalarClipWithRotation class}  \subsubsection{\MapOnScalarClipWithRotation class}
365    
366  \begin{classdesc}{MapOnScalarClipWithRotation}{scene, data_collector,  \begin{classdesc}{MapOnScalarClipWithRotation}{scene, data_collector,
367  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False}
368  This class works in a similar way to \Map except that it  This class works in a similar way to \Map except that it
369  shows a 2D scalar field clipped using a scalar value and subsequently  shows a 2D scalar field clipped using a scalar value and subsequently
# Line 377  Methods from \ActorThreeD, \Clipper, \Ro Line 376  Methods from \ActorThreeD, \Clipper, \Ro
376    
377  \subsubsection{\Velocity class}  \subsubsection{\Velocity class}
378    
379  \begin{classdesc}{Velocity}{scene, data_collector, arrow = Arrow.TWO_D,  \begin{classdesc}{Velocity}{scene, data_collector, arrow = Arrow.TWO_D,
380  color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST,    color_mode = ColorMode.VECTOR, viewport = Viewport.SOUTH_WEST,
381  lut = Lut.COLOR, cell_to_point = False, outline = True}  lut = Lut.COLOR, cell_to_point = False, outline = True}
382  This class is used to display a vector field using arrows. The arrows can  This class is used to display a vector field using arrows. The arrows can
383  either be color or gray-scale, depending on the lookup table used. If the  either be color or gray-scale, depending on the lookup table used. If the
384  arrows are colored, there are two possible coloring modes, either using vector  arrows are colored, there are two possible coloring modes, either using vector
385  data or scalar data. Similarly, there are two possible types of arrows, either  data or scalar data. Similarly, there are two possible types of arrows, either
386  two-dimensional or three-dimensional.  two-dimensional or three-dimensional.
387  \end{classdesc}  \end{classdesc}
388    
389  The following are some of the methods available:\\  The following are some of the methods available:\\
390  Methods from \ActorThreeD, \GlyphThreeD, \MaskPoints and \DataSetMapper.  Methods from \ActorThreeD, \GlyphThreeD, \MaskPoints and \DataSetMapper.
391    
392  \subsubsection{\VelocityOnPlaneCut class}  \subsubsection{\VelocityOnPlaneCut class}
393    
394  \begin{classdesc}{VelocityOnPlaneCut}{scene, data_collector,  \begin{classdesc}{VelocityOnPlaneCut}{scene, data_collector,
395  arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,  arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,
396  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,
397  cell_to_point = False, outline = True}  cell_to_point = False, outline = True}
398  This class works in a similar way to \MapOnPlaneCut, except that it shows a  This class works in a similar way to \MapOnPlaneCut, except that it shows a
399  vector field using arrows cut using a plane.  vector field using arrows cut using a plane.
400  \end{classdesc}  \end{classdesc}
401    
402  The following are some of the methods available:\\  The following are some of the methods available:\\
403  Methods from \ActorThreeD, \GlyphThreeD, \Transform, \MaskPoints and  Methods from \ActorThreeD, \GlyphThreeD, \Transform, \MaskPoints and
404  \DataSetMapper.  \DataSetMapper.
405    
406  A typical usage of \VelocityOnPlaneCut is shown below.  A typical usage of \VelocityOnPlaneCut is shown below.
407    
# Line 427  IMAGE_NAME = "velocity.jpg" Line 426  IMAGE_NAME = "velocity.jpg"
426  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
427    
428  # Create a Scene.  # Create a Scene.
429  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
430          y_size = Y_SIZE)          y_size = Y_SIZE)
431    
432  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
# Line 436  dc1.setFileName(file_name = os.path.join Line 435  dc1.setFileName(file_name = os.path.join
435  dc1.setActiveVector(vector = VECTOR_FIELD_CELL_DATA)  dc1.setActiveVector(vector = VECTOR_FIELD_CELL_DATA)
436    
437  # Create VelocityOnPlaneCut.  # Create VelocityOnPlaneCut.
438  vopc1 = VelocityOnPlaneCut(scene = s, data_collector = dc1,  vopc1 = VelocityOnPlaneCut(scene = s, data_collector = dc1,
439          viewport = Viewport.SOUTH_WEST, color_mode = ColorMode.VECTOR,          viewport = Viewport.SOUTH_WEST, color_mode = ColorMode.VECTOR,
440          arrow = Arrow.THREE_D, lut = Lut.COLOR, cell_to_point = False,          arrow = Arrow.THREE_D, lut = Lut.COLOR, cell_to_point = False,
441          outline = True)          outline = True)
442  vopc1.setScaleFactor(scale_factor = 0.5)  vopc1.setScaleFactor(scale_factor = 0.5)
443  vopc1.setPlaneToXY(offset = 0.5)  vopc1.setPlaneToXY(offset = 0.5)
# Line 456  s.render(image_name = os.path.join(PYVIS Line 455  s.render(image_name = os.path.join(PYVIS
455    
456  \subsubsection{\VelocityOnPlaneClip class}  \subsubsection{\VelocityOnPlaneClip class}
457    
458  \begin{classdesc}{VelocityOnPlaneClip}{scene, data_collector,  \begin{classdesc}{VelocityOnPlaneClip}{scene, data_collector,
459  arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,  arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR,
460  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR,
461  cell_to_point = False, online = True}  cell_to_point = False, online = True}
462  This class works in a similar way to \MapOnPlaneClip, except that it shows a  This class works in a similar way to \MapOnPlaneClip, except that it shows a
463  vector field using arrows clipped using a plane.  vector field using arrows clipped using a plane.
464  \end{classdesc}  \end{classdesc}
465    
466  The following are some of the methods available:\\  The following are some of the methods available:\\
467  Methods from \ActorThreeD, \GlyphThreeD, \Transform, \Clipper,  Methods from \ActorThreeD, \GlyphThreeD, \Transform, \Clipper,
468  \MaskPoints and \DataSetMapper.  \MaskPoints and \DataSetMapper.
469    
470  \subsubsection{\Ellipsoid class}  \subsubsection{\Ellipsoid class}
471    
472  \begin{classdesc}{Ellipsoid}{scene, data_collector,  \begin{classdesc}{Ellipsoid}{scene, data_collector,
473  viewport = Viewport = SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport = SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
474  outline = True}  outline = True}
475  Class that shows a tensor field using ellipsoids. The ellipsoids can either be  Class that shows a tensor field using ellipsoids. The ellipsoids can either be
476  color or gray-scale, depending on the lookup table used.  color or gray-scale, depending on the lookup table used.
477  \end{classdesc}  \end{classdesc}
478    
479  The following are some of the methods available:\\  The following are some of the methods available:\\
480  Methods from \ActorThreeD, \Sphere, \TensorGlyph, \MaskPoints and  Methods from \ActorThreeD, \Sphere, \TensorGlyph, \MaskPoints and
481  \DataSetMapper.  \DataSetMapper.
482    
483  \subsubsection{\EllipsoidOnPlaneCut class}  \subsubsection{\EllipsoidOnPlaneCut class}
# Line 497  Methods from \ActorThreeD, \Sphere, \Ten Line 496  Methods from \ActorThreeD, \Sphere, \Ten
496  \subsubsection{\EllipsoidOnPlaneClip class}  \subsubsection{\EllipsoidOnPlaneClip class}
497    
498  \begin{classdesc}{EllipsoidOnPlaneClip}{scene, data_collector,  \begin{classdesc}{EllipsoidOnPlaneClip}{scene, data_collector,
499  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
500  outline = True}  outline = True}
501  This class works in a similar way to \MapOnPlaneClip, except that it shows a  This class works in a similar way to \MapOnPlaneClip, except that it shows a
502  tensor field using ellipsoids clipped using a plane.  tensor field using ellipsoids clipped using a plane.
503  \end{classdesc}  \end{classdesc}
504            
505  The following are some of the methods available:\\  The following are some of the methods available:\\
506  Methods from \ActorThreeD, \Sphere, \TensorGlyph, \Transform, \Clipper,  Methods from \ActorThreeD, \Sphere, \TensorGlyph, \Transform, \Clipper,
507  \MaskPoints and \DataSetMapper.  \MaskPoints and \DataSetMapper.
# Line 530  IMAGE_NAME = "ellipsoid.jpg" Line 529  IMAGE_NAME = "ellipsoid.jpg"
529  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
530    
531  # Create a Scene.  # Create a Scene.
532  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
533          y_size = Y_SIZE)          y_size = Y_SIZE)
534    
535  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
# Line 539  dc1.setFileName(file_name = os.path.join Line 538  dc1.setFileName(file_name = os.path.join
538  dc1.setActiveTensor(tensor = TENSOR_FIELD_CELL_DATA)  dc1.setActiveTensor(tensor = TENSOR_FIELD_CELL_DATA)
539    
540  # Create an EllipsoidOnPlaneClip.  # Create an EllipsoidOnPlaneClip.
541  eopc1 = EllipsoidOnPlaneClip(scene = s, data_collector = dc1,  eopc1 = EllipsoidOnPlaneClip(scene = s, data_collector = dc1,
542          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = True,          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = True,
543          outline = True)          outline = True)
544  eopc1.setPlaneToXY()  eopc1.setPlaneToXY()
545  eopc1.setScaleFactor(scale_factor = 0.2)  eopc1.setScaleFactor(scale_factor = 0.2)
# Line 558  s.render(image_name = os.path.join(PYVIS Line 557  s.render(image_name = os.path.join(PYVIS
557    
558  \subsubsection{\Contour class}  \subsubsection{\Contour class}
559    
560  \begin{classdesc}{Contour}{scene, data_collector,  \begin{classdesc}{Contour}{scene, data_collector,
561  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
562  outline = True}  outline = True}
563  Class that shows a scalar field using contour surfaces. The contour surfaces  Class that shows a scalar field using contour surfaces. The contour surfaces
564  can either be color or gray-scale, depending on the lookup table used. This  can either be color or gray-scale, depending on the lookup table used. This
# Line 567  class can also be used to generate isosu Line 566  class can also be used to generate isosu
566  \end{classdesc}  \end{classdesc}
567    
568  The following are some of the methods available:\\  The following are some of the methods available:\\
569  Methods from \ActorThreeD, \ContourModule and \DataSetMapper.  Methods from \ActorThreeD, \ContourModule and \DataSetMapper.
570    
571  A typical usage of \Contour is shown below.  A typical usage of \Contour is shown below.
572    
# Line 592  IMAGE_NAME = "contour.jpg" Line 591  IMAGE_NAME = "contour.jpg"
591  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
592    
593  # Create a Scene.  # Create a Scene.
594  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
595          y_size = Y_SIZE)          y_size = Y_SIZE)
596    
597  # Create a DataCollector reading a XML file.  # Create a DataCollector reading a XML file.
# Line 616  s.render(image_name = os.path.join(PYVIS Line 615  s.render(image_name = os.path.join(PYVIS
615  \subsubsection{\ContourOnPlaneCut class}  \subsubsection{\ContourOnPlaneCut class}
616    
617  \begin{classdesc}{ContourOnPlaneCut}{scene, data_collector,  \begin{classdesc}{ContourOnPlaneCut}{scene, data_collector,
618  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
619  outline = True}  outline = True}
620  This class works in a similar way to \MapOnPlaneCut, except that it shows a  This class works in a similar way to \MapOnPlaneCut, except that it shows a
621  scalar field using contour surfaces cut using a plane.  scalar field using contour surfaces cut using a plane.
622  \end{classdesc}  \end{classdesc}
623    
624  The following are some of the methods available:\\  The following are some of the methods available:\\
625  Methods from \ActorThreeD, \ContourModule, \Transform and \DataSetMapper.  Methods from \ActorThreeD, \ContourModule, \Transform and \DataSetMapper.
626    
627  \subsubsection{\ContourOnPlaneClip class}  \subsubsection{\ContourOnPlaneClip class}
628    
629  \begin{classdesc}{ContourOnPlaneClip}{scene, data_collector,  \begin{classdesc}{ContourOnPlaneClip}{scene, data_collector,
630  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
631  outline = True}  outline = True}
632  This class works in a similar way to \MapOnPlaneClip, except that it shows a  This class works in a similar way to \MapOnPlaneClip, except that it shows a
633  scalar field using contour surfaces clipped using a plane.  scalar field using contour surfaces clipped using a plane.
634  \end{classdesc}  \end{classdesc}
635    
636  The following are some of the methods available:\\  The following are some of the methods available:\\
637  Methods from \ActorThreeD, \ContourModule, \Transform, \Clipper and  Methods from \ActorThreeD, \ContourModule, \Transform, \Clipper and
638  \DataSetMapper.  \DataSetMapper.
639    
640  \subsubsection{\StreamLine class}  \subsubsection{\StreamLine class}
641    
# Line 645  viewport = Viewport.SOUTH_WEST, color_mo Line 644  viewport = Viewport.SOUTH_WEST, color_mo
644  cell_to_point = False, outline = True}  cell_to_point = False, outline = True}
645  Class that shows the direction of particles of a vector field using streamlines.  Class that shows the direction of particles of a vector field using streamlines.
646  The streamlines can either be color or gray-scale, depending on the lookup  The streamlines can either be color or gray-scale, depending on the lookup
647  table used. If the streamlines are colored, there are two possible coloring  table used. If the streamlines are colored, there are two possible coloring
648  modes, either using vector data or scalar data.  modes, either using vector data or scalar data.
649  \end{classdesc}  \end{classdesc}
650    
651  The following are some of the methods available:\\  The following are some of the methods available:\\
652  Methods from \ActorThreeD, \PointSource, \StreamLineModule, \Tube and  Methods from \ActorThreeD, \PointSource, \StreamLineModule, \Tube and
653  \DataSetMapper.  \DataSetMapper.
654    
655  A typical usage of \StreamLine is shown below.  A typical usage of \StreamLine is shown below.
656    
# Line 661  Author: John Ngui, john.ngui@uq.edu.au Line 660  Author: John Ngui, john.ngui@uq.edu.au
660  """  """
661    
662  # Import the necessary modules.  # Import the necessary modules.
663  from esys.pyvisi import Scene, DataCollector, StreamLine, Camera  from esys.pyvisi import Scene, DataCollector, StreamLine, Camera
664  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
665  import os  import os
666    
# Line 676  IMAGE_NAME = "streamline.jpg" Line 675  IMAGE_NAME = "streamline.jpg"
675  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
676    
677  # Create a Scene.  # Create a Scene.
678  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
679          y_size = Y_SIZE)          y_size = Y_SIZE)
680    
681  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
# Line 685  dc1.setFileName(file_name = os.path.join Line 684  dc1.setFileName(file_name = os.path.join
684    
685  # Create streamlines.  # Create streamlines.
686  sl1 = StreamLine(scene = s, data_collector = dc1,  sl1 = StreamLine(scene = s, data_collector = dc1,
687          viewport = Viewport.SOUTH_WEST, color_mode = ColorMode.SCALAR,          viewport = Viewport.SOUTH_WEST, color_mode = ColorMode.SCALAR,
688          lut = Lut.COLOR, cell_to_point = False, outline = True)          lut = Lut.COLOR, cell_to_point = False, outline = True)
689  sl1.setTubeRadius(radius = 0.02)  sl1.setTubeRadius(radius = 0.02)
690  sl1.setTubeNumberOfSides(3)  sl1.setTubeNumberOfSides(3)
# Line 703  s.render(image_name = os.path.join(PYVIS Line 702  s.render(image_name = os.path.join(PYVIS
702  \subsubsection{\Carpet class}  \subsubsection{\Carpet class}
703    
704  \begin{classdesc}{Carpet}{scene, data_collector,  \begin{classdesc}{Carpet}{scene, data_collector,
705  viewport = Viewport.Viewport.SOUTH_WEST, warp_mode = WarpMode.SCALAR,  viewport = Viewport.Viewport.SOUTH_WEST, warp_mode = WarpMode.SCALAR,
706  lut = Lut.COLOR, cell_to_point = False, outline = True}  lut = Lut.COLOR, cell_to_point = False, outline = True}
707  This class works in a similar way to \MapOnPlaneCut, except that it shows a  This class works in a similar way to \MapOnPlaneCut, except that it shows a
708  scalar field cut on a plane and deformed (warped) along the normal. The  scalar field cut on a plane and deformed (warped) along the normal. The
709  plane can either be color or gray-scale, depending on the lookup table used.  plane can either be color or gray-scale, depending on the lookup table used.
710  Similarly, the plane can be deformed either using scalar data or vector data.  Similarly, the plane can be deformed either using scalar data or vector data.
711  \end{classdesc}  \end{classdesc}
712    
# Line 737  IMAGE_NAME = "carpet.jpg" Line 736  IMAGE_NAME = "carpet.jpg"
736  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
737    
738  # Create a Scene.  # Create a Scene.
739  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
740          y_size = Y_SIZE)          y_size = Y_SIZE)
741    
742  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
# Line 746  dc1.setFileName(file_name = os.path.join Line 745  dc1.setFileName(file_name = os.path.join
745  dc1.setActiveScalar(scalar = SCALAR_FIELD_CELL_DATA)  dc1.setActiveScalar(scalar = SCALAR_FIELD_CELL_DATA)
746    
747  # Create a Carpet.  # Create a Carpet.
748  cpt1 = Carpet(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,  cpt1 = Carpet(scene = s, data_collector = dc1, viewport = Viewport.SOUTH_WEST,
749          warp_mode = WarpMode.SCALAR, lut = Lut.COLOR, cell_to_point = True,          warp_mode = WarpMode.SCALAR, lut = Lut.COLOR, cell_to_point = True,
750          outline = True)          outline = True)
751  cpt1.setPlaneToXY(0.2)  cpt1.setPlaneToXY(0.2)
# Line 762  s.render(image_name = os.path.join(PYVIS Line 761  s.render(image_name = os.path.join(PYVIS
761    
762  \subsubsection{\Legend class}  \subsubsection{\Legend class}
763    
764  \begin{classdesc}{Legend}{scene, data_collector,  \begin{classdesc}{Legend}{scene, data_collector,
765  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, legend = LegendType.SCALAR}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, legend = LegendType.SCALAR}
766  Class that shows a scalar field on a domain surface. The domain surface  Class that shows a scalar field on a domain surface. The domain surface
767  can either be color or gray-scale, depending on the lookup table used  can either be color or gray-scale, depending on the lookup table used
# Line 784  Methods from \ActorThreeD, \CubeSource a Line 783  Methods from \ActorThreeD, \CubeSource a
783    
784  \begin{classdesc}{Image}{scene, image_reader, viewport = Viewport.SOUTH_WEST}  \begin{classdesc}{Image}{scene, image_reader, viewport = Viewport.SOUTH_WEST}
785  Class that displays an image which can be scaled (upwards and downwards) and  Class that displays an image which can be scaled (upwards and downwards) and
786  has interaction capability. The image can also be translated and rotated along  has interaction capability. The image can also be translated and rotated along
787  the X, Y and Z axes. One of the most common use of this feature is pasting an  the X, Y and Z axes. One of the most common use of this feature is pasting an
788  image on a surface map.  image on a surface map.
789  \end{classdesc}  \end{classdesc}
790    
# Line 817  SAVE_IMAGE_NAME = "image.jpg" Line 816  SAVE_IMAGE_NAME = "image.jpg"
816  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
817    
818  # Create a Scene.  # Create a Scene.
819  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
820          y_size = Y_SIZE)          y_size = Y_SIZE)
821    
822  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
# Line 841  i.translate(0,0,-1) Line 840  i.translate(0,0,-1)
840  i.setPoint1(GlobalPosition(2,0,0))  i.setPoint1(GlobalPosition(2,0,0))
841  i.setPoint2(GlobalPosition(0,2,0))  i.setPoint2(GlobalPosition(0,2,0))
842    
843  # Create a Camera.  # Create a Camera.
844  c1 = Camera(scene = s, viewport = Viewport.SOUTH_WEST)  c1 = Camera(scene = s, viewport = Viewport.SOUTH_WEST)
845    
846  # Render the image.  # Render the image.
# Line 890  Author: John Ngui, john.ngui@uq.edu.au Line 889  Author: John Ngui, john.ngui@uq.edu.au
889  """  """
890    
891  # Import the necessary modules.  # Import the necessary modules.
892  from esys.pyvisi import Scene, DataCollector, Map, Camera, Velocity, Legend  from esys.pyvisi import Scene, DataCollector, Map, Camera, Velocity, Legend
893  from esys.pyvisi import Movie, LocalPosition  from esys.pyvisi import Movie, LocalPosition
894  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
895  import os  import os
# Line 906  IMAGE_NAME = "movie" Line 905  IMAGE_NAME = "movie"
905  JPG_RENDERER = Renderer.OFFLINE_JPG  JPG_RENDERER = Renderer.OFFLINE_JPG
906    
907  # Create a Scene.  # Create a Scene.
908  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
909          y_size = Y_SIZE)          y_size = Y_SIZE)
910    
911  # Create a DataCollector reading from a XML file.  # Create a DataCollector reading from a XML file.
912  dc1 = DataCollector(source = Source.XML)  dc1 = DataCollector(source = Source.XML)
913  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA)  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA)
914    
915  # Create a Map.  # Create a Map.
916  m1 = Map(scene = s, data_collector = dc1,  m1 = Map(scene = s, data_collector = dc1,
917          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
918          outline = True)          outline = True)
919    
# Line 925  cam1 = Camera(scene = s, viewport = View Line 924  cam1 = Camera(scene = s, viewport = View
924  mov = Movie()  mov = Movie()
925  lst = []  lst = []
926    
927  # Read in one file one after another and render the object.  # Read in one file one after another and render the object.
928  for i in range(938, 949):  for i in range(938, 949):
929      dc1.setFileName(file_name =  os.path.join(PYVISI_EXAMPLE_MESHES_PATH, \      dc1.setFileName(file_name =  os.path.join(PYVISI_EXAMPLE_MESHES_PATH, \
930              FILE_2D + "%06d.vtu") % i)              FILE_2D + "%06d.vtu") % i)
# Line 936  for i in range(938, 949): Line 935  for i in range(938, 949):
935      lst.append(IMAGE_NAME + "%06d.jpg" % i)      lst.append(IMAGE_NAME + "%06d.jpg" % i)
936    
937  # Images (first and last inclusive) from which the movie is to be generated.  # Images (first and last inclusive) from which the movie is to be generated.
938  mov.imageRange(input_directory = PYVISI_EXAMPLE_IMAGES_PATH,  mov.imageRange(input_directory = PYVISI_EXAMPLE_IMAGES_PATH,
939          first_image = IMAGE_NAME + "000938.jpg",          first_image = IMAGE_NAME + "000938.jpg",
940          last_image = IMAGE_NAME + "000948.jpg")          last_image = IMAGE_NAME + "000948.jpg")
941    
942  # Alternatively, a list of images can be specified.  # Alternatively, a list of images can be specified.
# Line 971  Class that defines a position (X, Y and Line 970  Class that defines a position (X, Y and
970    
971    
972  \subsection{Supporting Classes}  \subsection{Supporting Classes}
973  This subsection details the supporting classes and their corresponding methods  This subsection details the supporting classes and their corresponding methods
974  inherited by the input (see \Sec{INPUT SEC}) and data  inherited by the input (see \Sec{INPUT SEC}) and data
975  visualization classes (see \Sec{DATAVIS SEC}).  visualization classes (see \Sec{DATAVIS SEC}).
976    
977  \subsubsection{\ActorThreeD class}  \subsubsection{\ActorThreeD class}
# Line 1024  Class that defines the contour module. \ Line 1023  Class that defines the contour module. \
1023    
1024  The following are some of the methods available:  The following are some of the methods available:
1025    
1026  \begin{methoddesc}[ContourModule]{generateContours}{contours = None,  \begin{methoddesc}[ContourModule]{generateContours}{contours = None,
1027  lower_range = None, upper_range = None}  lower_range = None, upper_range = None}
1028  Generate the specified number of contours within the specified range.  Generate the specified number of contours within the specified range.
1029  In order to generate a single isosurface, the 'lower_range' and 'upper_range'  In order to generate a single isosurface, the 'lower_range' and 'upper_range'
1030  must be set to the same value.  must be set to the same value.
1031  \end{methoddesc}  \end{methoddesc}
1032    
# Line 1262  Class that defines a cube source. The ce Line 1261  Class that defines a cube source. The ce
1261  the point from which the cube is to be generated and the X, Y  the point from which the cube is to be generated and the X, Y
1262  and Z lengths define the length of the cube from the center point. If  and Z lengths define the length of the cube from the center point. If
1263  X length is 3, then the X length to the left and right of the center  X length is 3, then the X length to the left and right of the center
1264  point is 1.5 respectively.\\  point is 1.5 respectively.\\
1265    
1266  The following are some of the methods available:  The following are some of the methods available:
1267    
# Line 1297  Set the angle of rotation. Line 1296  Set the angle of rotation.
1296  \end{methoddesc}  \end{methoddesc}
1297    
1298    
1299  % #############################################################################  % #############################################################################
1300    
1301    
1302  \section{More Examples}  \section{More Examples}
# Line 1313  Author: John Ngui, john.ngui@uq.edu.au Line 1312  Author: John Ngui, john.ngui@uq.edu.au
1312  """  """
1313    
1314  # Import the necessary modules.  # Import the necessary modules.
1315  from esys.pyvisi import Scene, DataCollector, Contour, Camera  from esys.pyvisi import Scene, DataCollector, Contour, Camera
1316  from esys.pyvisi.constant import *  from esys.pyvisi.constant import *
1317  import os  import os
1318    
# Line 1330  IMAGE_NAME = "seriesofreads" Line 1329  IMAGE_NAME = "seriesofreads"
1329  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
1330    
1331  # Create a Scene.  # Create a Scene.
1332  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
1333          y_size = Y_SIZE)          y_size = Y_SIZE)
1334    
1335  # Create a DataCollector reading from an XML file.  # Create a DataCollector reading from an XML file.
1336  dc1 = DataCollector(source = Source.XML)  dc1 = DataCollector(source = Source.XML)
1337  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_1)  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_1)
1338    
1339  # Create a Contour.  # Create a Contour.
1340  mosc1 = Contour(scene = s, data_collector = dc1,  mosc1 = Contour(scene = s, data_collector = dc1,
1341          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
1342          outline = True)          outline = True)
1343  mosc1.generateContours(0)  mosc1.generateContours(0)
1344    
1345  # Create a second DataCollector reading from the same XML file  # Create a second DataCollector reading from the same XML file
1346  # but specifying a different scalar field.  # but specifying a different scalar field.
1347  dc2 = DataCollector(source = Source.XML)  dc2 = DataCollector(source = Source.XML)
1348  dc2.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_2)  dc2.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA_2)
1349    
1350  # Create a second Contour.  # Create a second Contour.
1351  mosc2 = Contour(scene = s, data_collector = dc2,  mosc2 = Contour(scene = s, data_collector = dc2,
1352          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
1353          outline = True)          outline = True)
1354  mosc2.generateContours(0)  mosc2.generateContours(0)
# Line 1357  mosc2.generateContours(0) Line 1356  mosc2.generateContours(0)
1356  # Create a Camera.  # Create a Camera.
1357  cam1 = Camera(scene = s, viewport = Viewport.SOUTH_WEST)  cam1 = Camera(scene = s, viewport = Viewport.SOUTH_WEST)
1358    
1359  # Read in one file after another and render the object.  # Read in one file after another and render the object.
1360  for i in range(99, 104):  for i in range(99, 104):
1361      dc1.setFileName(file_name =  os.path.join(PYVISI_EXAMPLE_MESHES_PATH, \      dc1.setFileName(file_name =  os.path.join(PYVISI_EXAMPLE_MESHES_PATH, \
1362              FILE_2D + "%04d.vtu") % i)              FILE_2D + "%04d.vtu") % i)
# Line 1393  IMAGE_NAME = "seriesofcuts" Line 1392  IMAGE_NAME = "seriesofcuts"
1392  JPG_RENDERER = Renderer.ONLINE_JPG  JPG_RENDERER = Renderer.ONLINE_JPG
1393    
1394  # Create a Scene.  # Create a Scene.
1395  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,  s = Scene(renderer = JPG_RENDERER, num_viewport = 1, x_size = X_SIZE,
1396          y_size = Y_SIZE)          y_size = Y_SIZE)
1397    
1398  # Create a DataCollector reading from an XML file.  # Create a DataCollector reading from an XML file.
# Line 1402  dc1.setFileName(file_name = os.path.join Line 1401  dc1.setFileName(file_name = os.path.join
1401  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA)  dc1.setActiveScalar(scalar = SCALAR_FIELD_POINT_DATA)
1402    
1403  # Create a MapOnPlaneCut.  # Create a MapOnPlaneCut.
1404  mopc1 = MapOnPlaneCut(scene = s, data_collector = dc1,  mopc1 = MapOnPlaneCut(scene = s, data_collector = dc1,
1405          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,          viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
1406          outline = True)          outline = True)
1407  mopc1.setPlaneToYZ(offset = 0.1)  mopc1.setPlaneToYZ(offset = 0.1)
# Line 1490  while t < 0.4: Line 1489  while t < 0.4:
1489        T = mypde.getSolution()        T = mypde.getSolution()
1490    
1491        dc.setData(temp = T)        dc.setData(temp = T)
1492          
1493        # Render the object.        # Render the object.
1494        s.render(image_name = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, \        s.render(image_name = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, \
1495                "diffusion%02d.jpg") % i)                "diffusion%02d.jpg") % i)
# Line 1507  objects using the Online approach. Line 1506  objects using the Online approach.
1506  \begin{tabular}{| c | p{12cm} |}  \begin{tabular}{| c | p{12cm} |}
1507  \hline  \hline
1508  \textbf{Key} & \textbf{Description} \\ \hline  \textbf{Key} & \textbf{Description} \\ \hline
1509  Keypress 'c' / 'a' & Toggle between the camera ('c') and object ('a')  mode. In  Keypress 'c' / 'a' & Toggle between the camera ('c') and object ('a')  mode. In
1510  camera mode, mouse events affect the camera position and focal point. In  camera mode, mouse events affect the camera position and focal point. In
1511  object mode, mouse events affect the rendered object's element (i.e.  object mode, mouse events affect the rendered object's element (i.e.
1512  cut surface map, clipped velocity field, streamline, etc) that is under the  cut surface map, clipped velocity field, streamline, etc) that is under the
1513  mouse pointer.\\ \hline  mouse pointer.\\ \hline
1514  Mouse button 1 & Rotate the camera around its focal point (if in camera mode)  Mouse button 1 & Rotate the camera around its focal point (if in camera mode)
1515  or rotate the rendered object's element (if in object mode).\\ \hline  or rotate the rendered object's element (if in object mode).\\ \hline
1516  Mouse button 2 & Pan the camera (if in camera mode) or translate the rendered  Mouse button 2 & Pan the camera (if in camera mode) or translate the rendered
1517  object's element (if in object mode). \\ \hline  object's element (if in object mode). \\ \hline
1518  Mouse button 3 & Zoom the camera (if in camera mode) or scale the rendered  Mouse button 3 & Zoom the camera (if in camera mode) or scale the rendered
1519  object's element (if in object mode). \\ \hline  object's element (if in object mode). \\ \hline
1520  Keypress 3 & Toggle the render window in and out of stereo mode. By default,  Keypress 3 & Toggle the render window in and out of stereo mode. By default,
1521  red-blue stereo pairs are created. \\ \hline  red-blue stereo pairs are created. \\ \hline
1522  Keypress 'e' / 'q' & Exit the application if only one file is to be read, or  Keypress 'e' / 'q' & Exit the application if only one file is to be read, or
1523  read and display the next file if multiple files are to be read. \\ \hline  read and display the next file if multiple files are to be read. \\ \hline
1524  Keypress 's' & Modify the representation of the rendered object to surfaces.  Keypress 's' & Modify the representation of the rendered object to surfaces.
1525  \\ \hline  \\ \hline
# Line 1547  The source code to produce these images Line 1546  The source code to produce these images
1546  \begin{table}[hb]  \begin{table}[hb]
1547  \begin{tabular}{c c c}  \begin{tabular}{c c c}
1548  \includegraphics[width=\thumbnailwidth]{Map} &  \includegraphics[width=\thumbnailwidth]{Map} &
1549  \includegraphics[width=\thumbnailwidth]{MapOnPlaneCut} &  \includegraphics[width=\thumbnailwidth]{MapOnPlaneCut} &
1550  \includegraphics[width=\thumbnailwidth]{MapOnPlaneClip} \\  \includegraphics[width=\thumbnailwidth]{MapOnPlaneClip} \\
1551  Map & MapOnPlaneCut & MapOnPlaneClip \\  Map & MapOnPlaneCut & MapOnPlaneClip \\
1552  \includegraphics[width=\thumbnailwidth]{MapOnScalarClip} &  \includegraphics[width=\thumbnailwidth]{MapOnScalarClip} &

Legend:
Removed from v.3292  
changed lines
  Added in v.3293

  ViewVC Help
Powered by ViewVC 1.1.26