/[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 1035 by jongui, Fri Mar 16 04:54:17 2007 UTC revision 1076 by jongui, Wed Apr 4 06:40:33 2007 UTC
# Line 7  Line 7 
7  \pyvisi is a Python module that is used to generate 2D and 3D visualization  \pyvisi is a Python module that is used to generate 2D and 3D visualization
8  for escript and its PDE solvers: finley and bruce. This module provides  for escript and its PDE solvers: finley and bruce. This module provides
9  an easy to use interface to the \VTK library (\VTKUrl). There are three forms  an easy to use interface to the \VTK library (\VTKUrl). There are three forms
10  of rendering an object: (1) online: a single rendered object is displayed and    of rendering an object. (1) Online - object is rendered on-screen with
11  interaction (i.e. zoom and rotate) can occur, (2) offline: multiple rendered  interaction (i.e. zoom and rotate) capability, (2) Offline - object is rendered
12  objects are not displayed but are instead saved as a series of images. No  off-screen with no interation capability and (3) Display - object is rendered
13  interaction can occur and (3) animate: similar to offline except that multiple  on-screen but with no interaction capability (able to procude on-the-fly
14  rendered objects are displayed one after another (animated on-the-fly) and  animation). All three approaches has the option to save the rendered object as
15  no images are saved.  No interaction can occur.  an image.
16    
17  The general rule of thumb when using \pyvisi is to perform the following  The following points outlines the general guidelines when using \pyvisi:
 in sequence:  
18    
19  \begin{enumerate}  \begin{enumerate}
20  \item Create a scene instance (i.e. \Scene), which is a window in which objects are to be  \item Create a \Scene instance, a window in which objects are to be rendered on.
21  rendered on.  \item Create a data input instance (i.e. \DataCollector or \ImageReader), which
22  \item Create an input instance (i.e. \DataCollector), which reads and loads  reads and loads the source data for visualization.
 the source data for visualization.  
23  \item Create a data visualization instance (i.e. \Map, \Velocity, \Ellipsoid,  \item Create a data visualization instance (i.e. \Map, \Velocity, \Ellipsoid,
24  \Contour and \Carpet), which proccesses and manipulates the source data.  \Contour, \Carpet, \StreamLine or \Image), which proccesses and manipulates the
25  \item Create a camera (i.e. \Camera) instance, which controls the viewing angle.  source data.
26  \item Lastly, render the object online, offline or animate.  \item Create a \Camera or \Light instance, which controls the viewing angle and
27    lighting effects.
28    \item Lastly, render the object using either the Online, Offline or Display
29    option.
30  \end{enumerate}  \end{enumerate}
31  \begin{center}  \begin{center}
32  \begin{math}  \begin{math}
33  scene \rightarrow input \rightarrow visualization \rightarrow  scene \rightarrow data input \rightarrow data visualization \rightarrow
34  camera \rightarrow render  camera/light \rightarrow render
35  \end{math}  \end{math}
36  \end{center}  \end{center}
37    
38  The sequence in which instances are created is very important due to  The sequence in which instances are created is very important due to
39  to the dependencies among them. For example, an input instance must  to the dependencies among them. For example, a data input instance must
40  always be created BEFORE a data visualisation instance is created.  always be created BEFORE a data visualisation instance.
41  If the sequence is switched, the program will throw an error because a  If the sequence is switched, the program will throw an error because a
42  source data needs to be specified before the data can be  source data must to be specified before it can be
43  manipulated. Similarly, a camera instance must always be created  manipulated. Similarly, a camera and light instance must always be created
44  AFTER an input instance has been created. Otherwise, the program will throw  AFTER an input instance, otherwise the program will throw
45  an error because the camera instance needs to calculate its  an error because the camera and light instance needs to calculates its
46  default position (automatically carried out in the background) based on  position based on the source data.
 the source data.  
47    
48  \section{\pyvisi Classes}  \section{\pyvisi Classes}
49  The following subsections give a brief overview of the important classes  The following subsections give a brief overview of the important classes
# Line 255  data. Line 255  data.
255  \subsubsection{\Map class}  \subsubsection{\Map class}
256    
257  \begin{classdesc}{Map}{scene, data_collector,  \begin{classdesc}{Map}{scene, data_collector,
258  viewport = Viewport.Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
259    outline = True}
260  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
261  can either be colored or grey-scaled, depending on the lookup table used.  can either be colored or grey-scaled, depending on the lookup table used.
262  \end{classdesc}  \end{classdesc}
# Line 266  Methods from \ActorThreeD. Line 267  Methods from \ActorThreeD.
267  \subsubsection{\MapOnPlaneCut class}  \subsubsection{\MapOnPlaneCut class}
268    
269  \begin{classdesc}{MapOnPlaneCut}{scene, data_collector,  \begin{classdesc}{MapOnPlaneCut}{scene, data_collector,
270  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
271    outline = True}
272  This class works in a similar way to \Map, except that it shows a scalar  This class works in a similar way to \Map, except that it shows a scalar
273  field on a plane. The plane can be translated and rotated along the X, Y and  field on a plane. The plane can be translated and rotated along the X, Y and
274  Z axes.  Z axes.
# Line 278  Methods from \ActorThreeD and \Transform Line 280  Methods from \ActorThreeD and \Transform
280  \subsubsection{\MapOnPlaneClip class}  \subsubsection{\MapOnPlaneClip class}
281    
282  \begin{classdesc}{MapOnPlaneClip}{scene, data_collector,  \begin{classdesc}{MapOnPlaneClip}{scene, data_collector,
283  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
284    outline = True}
285  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
286  scalar field clipped using a plane.  scalar field clipped using a plane.
287  \end{classdesc}  \end{classdesc}
# Line 289  Methods from \ActorThreeD, \Transform an Line 292  Methods from \ActorThreeD, \Transform an
292  \subsubsection{\MapOnScalarClip class}  \subsubsection{\MapOnScalarClip class}
293    
294  \begin{classdesc}{MapOnScalarClip}{scene, data_collector,  \begin{classdesc}{MapOnScalarClip}{scene, data_collector,
295  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
296    outline = True}
297  This class works in a similar way to \Map, except that it shows a scalar  This class works in a similar way to \Map, except that it shows a scalar
298  field clipped using a scalar value.  field clipped using a scalar value.
299  \end{classdesc}  \end{classdesc}
# Line 375  and \StructuredPoints. Line 379  and \StructuredPoints.
379  \subsubsection{\Contour class}  \subsubsection{\Contour class}
380    
381  \begin{classdesc}{Contour}{scene, data_collector,  \begin{classdesc}{Contour}{scene, data_collector,
382  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
383    outline = True}
384  Class that shows a scalar field by contour surfaces. The contour surfaces can  Class that shows a scalar field by contour surfaces. The contour surfaces can
385  either be colored or grey-scaled, depending on the lookup table used. This  either be colored or grey-scaled, depending on the lookup table used. This
386  class can also be used to generate iso surfaces.  class can also be used to generate iso surfaces.
# Line 387  Methods from \ActorThreeD and \ContourMo Line 392  Methods from \ActorThreeD and \ContourMo
392  \subsubsection{\ContourOnPlaneCut class}  \subsubsection{\ContourOnPlaneCut class}
393    
394  \begin{classdesc}{ContourOnPlaneCut}{scene, data_collector,  \begin{classdesc}{ContourOnPlaneCut}{scene, data_collector,
395  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
396    outline = True}
397  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
398  scalar field by contour surfaces on a plane.  scalar field by contour surfaces on a plane.
399  \end{classdesc}  \end{classdesc}
# Line 398  Methods from \ActorThreeD, \ContourModul Line 404  Methods from \ActorThreeD, \ContourModul
404  \subsubsection{\ContourOnPlaneClip class}  \subsubsection{\ContourOnPlaneClip class}
405    
406  \begin{classdesc}{ContourOnPlaneClip}{scene, data_collector,  \begin{classdesc}{ContourOnPlaneClip}{scene, data_collector,
407  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True}  viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, cell_to_point = False,
408    outline = True}
409  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
410  scalar field by contour surfaces clipped using a plane.  scalar field by contour surfaces clipped using a plane.
411  \end{classdesc}  \end{classdesc}
# Line 448  Methods from \ActorThreeD, \PlaneSource Line 455  Methods from \ActorThreeD, \PlaneSource
455  %##############################################################################  %##############################################################################
456    
457    
458  \subsection{Coordiante Classes}  \subsection{Coordinate Classes}
459  This subsection details the instances used to position the rendered object.  This subsection details the instances used to position the rendered object.
460    
461  \begin{classdesc}{LocalPosition}{x_coor, y_coor}  \begin{classdesc}{LocalPosition}{x_coor, y_coor}

Legend:
Removed from v.1035  
changed lines
  Added in v.1076

  ViewVC Help
Powered by ViewVC 1.1.26