/[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 886 by jongui, Thu Nov 2 01:34:58 2006 UTC revision 1002 by jongui, Wed Feb 28 06:51:33 2007 UTC
# Line 1  Line 1 
1  \chapter{The module \pyvisi}  \chapter{The module \pyvisi}
2  \label{PYVISI CHAP}  \label{PYVISI CHAP}
3    \declaremodule{extension}{esys.pyvisi}
4    \modulesynopsis{Python Visualization Interface}
5    
6  \declaremodule{extension}{pyvisi}  \section{Introduction}
7  \modulesynopsis{Python visualization interface}  \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
9    an easy to use interface to the \VTK library (\VTKUrl).  
10    
11  \pyvisi provides an easy to use interface to the \VTK visualization  The general rule of thumb when using \pyvisi is to perform the following
12  tool. \pyvisi provides the following modules:  in sequence:
13    
14  \begin{itemize}  \begin{enumerate}
15  \item \Scene: Shows a scene in which components are to be displayed.  \item Create a scene instance, in which objects are to be rendered on.
16  \item \Image: Shows an image.  \item Create an input instance, which deals with the source of data for
17  \item \Text: Shows some 2D text.  the visualization.
18  \item \DataCollector: Deals with data for visualization.  \item Create a data visualization instance (i.e. Map, Velocity, Ellipsoid,
19  \item \Camera: Controls the camera manipulation.  etc), which extracts and manipulates the data accordingly.
20  \item \Light: Controls the light manipulation.  \item Create a camera instance, which controls the lighting
21  \item \Map: Shows a scalar field by color on the domain surface.  source and view angle.
22  \item \MapOnPlane: Shows a scalar field by color on a given plane.  \item Finally, render the object.
23  \item \MapOnClip: Shows a scalar field by color on a given clip.  \end{enumerate}
 \item \MapOnScalarClip: Shows a scalar field by color on a give scalar clip.  
 \item \Arrows: Shows a vector field by arrows.  
 \item \ArrowsOnPlane: Shows a vector field by arrows on a given plane.  
 \item \ArrowsOnClip: Shows a vector field by arrows on a given clip.  
 \item \IsoSurface: Shows a scalar field for a given value by  
 an isosurface.  
 \item \IsoSurfaceOnPlane: Shows a scalar field for a given value by  
 an isosurfaceon a given plane.  
 \item \IsoSurfaceOnClip: Shows a scalar field for a given vlaue by  
 an isosurface on a given clip.  
 \item \Contour: Shows a scalar field by contour surfaces.  
 \item \ContourOnPlane: Shows a scalar field by contour surfaces on  
 a given plane.  
 \item \ContourOnClip: Shows a scalar field by contour surfaces on  
 a given clip.  
 \item \TensorC: Shows a tensor field by ellipsoids.  
 \item \TensorOnPlane: Shows a tensor field by ellipsoids on  
 a given plane.  
 \item \TensorOnClip: Shows a tensor field by ellipsoids on a given clip.  
 \item \StreamLines: Shows the path of particles in a vector field.  
 \item \Carpet: Shows a scalar field as plane deformated along  
 the plane normal.  
 \item \Position: Defines the x,y and z coordinates rendered object.  
 \item \Transform: Defines the orientation of rendered object.  
 \item \Style: Defines the style of text.  
 \item \BlueToRed: Defines a map spectrum from blue to red.  
 \item \RedToBlue: Defines a map spectrum from red to blue.  
 \item \Plane: Defines the cutting/clipping of rendered objects.  
 \end{itemize}  
   
 \section{\Scene class}  
 \begin{classdesc}{Scene}{renderer, x_size = 500, y_size = 500}  
 A \Scene object creates a window onto which objects are to be displayed.  
 \end{classdesc}  
   
 The following are the methods available:  
 \begin{methoddesc}[Scene]{saveImage}{image_name}  
 Save the rendered object as an image off-screen.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Scene]{render}{}  
 Render the object on-screen.  
 \end{methoddesc}  
   
 The following is a sample code using the \Scene class:  
 \verbatiminput{../examples/driverscene.py}  
   
 \section{\Image class}  
 \begin{classdesc}{Image}{scene, format}  
 An \Image object shows an image.  
 \end{classdesc}  
   
 The following is the method available:  
 \begin{methoddesc}[Image]{setFileName}{file_name}  
 Set the file name.  
 \end{methoddesc}  
   
 The following is a sample code using the \Image class.  
 \fig{fig:image.1} shows the corresponding output.  
 \verbatiminput{../examples/driverimage.py}  
   
 \begin{figure}[ht]  
24  \begin{center}  \begin{center}
25  \includegraphics[width=40mm]{figures/Image}  \begin{math}
26    scene \rightarrow input \rightarrow visualization \rightarrow
27    camera \rightarrow render
28    \end{math}
29  \end{center}  \end{center}
 \caption{Image}  
 \label{fig:image.1}  
 \end{figure}  
   
 \section{\Text class}  
 \begin{classdesc}{Text}{scene}  
 A \Text object shows 2D text.  
 \end{classdesc}  
30    
31  The following are the methods available:  The sequence in which instances are created is very important due to
32  \begin{methoddesc}[Text]{setText}{text}  to the dependencies among them. For example, an input instance must
33  Set the text.  always be created BEFORE a data visualisation instance is created.
34  \end{methoddesc}  If the sequence is switched, the program will throw an error because a
35    source data needs to be specified before the data can be
36    manipulated. Similarly, a camera instance must always be created
37    AFTER an input instance has been created. Otherwise, the program will throw
38    an error because the camera instance needs to calculate its
39    default position (automatically carried out in the background) based on
40    the source data.
41    
42  \begin{methoddesc}[Text]{setPosition}{x_coor, y_coor}  \section{\pyvisi Classes}
43  Set the display position of the text.  This section gives a brief overview of the important classes and their
44  \end{methoddesc}  corresponding methods. Please refer to \ReferenceGuide for full details.
45    %=====================================================================================
46  \begin{methoddesc}[Text]{setStyle}{style}  \subsection{Scene Classes}
47  Set the style of the text.  \begin{classdesc}{Scene}{renderer = Renderer.ONLINE, num_viewport = 1,
48  \end{methoddesc}  x_size = 1152, y_size = 864}
49    Displays a scene in which objects are to be rendered on.
 The following is a sample code using the \Text class.  
 \fig{fig:text.1} shows the corresponding output.  
 \verbatiminput{../examples/drivertext.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/Text}  
 \end{center}  
 \caption{2D text}  
 \label{fig:text.1}  
 \end{figure}  
   
 \section{\DataCollector class}  
 \begin{classdesc}{DataCollector}{scene, outline = True, cube_axes = False}  
 A \DataCollector object deals with the data for visualization.  
50  \end{classdesc}  \end{classdesc}
51    
52  The following are the methods available:  \begin{classdesc}{Camera}{}
53  \begin{methoddesc}[DataCollector]{setFileName}{file_name}   Controls the camera manipulation.
 Set the file name from which data is to be read.  
 \end{methoddesc}  
   
 The following is a sample code using the \DataCollector class.  
 \fig{fig:datacollector.1} shows the corresponding output.  
 \verbatiminput{../examples/driverdatacollector.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/DataCollector}  
 \end{center}  
 \caption{Datacollector generating an outline with cube axes.}  
 \label{fig:datacollector.1}  
 \end{figure}  
   
 \section{\Camera class}  
 \begin{classdesc}{Camera}{scene, data_collector}  
 A \Camera object controls the camera's settings.  
54  \end{classdesc}  \end{classdesc}
55    
56  The following are some of the methods available:  \begin{classdesc}{Light}{}
57  \begin{methoddesc}[Camera]{setFocalPoint}{position}   Controls the light manipulation.
 Set the focal point of the camera.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{setPosition}{position}  
 Set the position of the camera.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{azimuth}{angle}  
 Rotate the camera to the left and right.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{elevation}{angle}  
 Rotate the camera to the top and bottom.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{roll}{angle}  
 Roll the camera to the left and right.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{backView}{}  
 View the back of the rendered object.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{topView}{}  
 View the top of the rendered object.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{bottomView}{}  
 View the bottom of the rendered object.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{leftView}{}  
 View the left side of the rendered object.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{rightView}{}  
 View the right side of the rendered object.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Camera]{isometricView}{}  
 View the isometric side of the rendered object.  
 \end{methoddesc}  
   
 The following is a sample code using the \Camera class.  
 \fig{fig:camera.1} shows the corresponding output.  
 \verbatiminput{../examples/drivercamera.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=30mm]{figures/Camera}  
 \end{center}  
 \caption{Camera manipulation}  
 \label{fig:camera.1}  
 \end{figure}  
   
 \section{\Light class}  
 \begin{classdesc}{Light}{scene, data_collector}  
 A \Light object controls the light's settings.  
58  \end{classdesc}  \end{classdesc}
59    
60  The following are the methods available:  %============================================================================================================
61  \begin{methoddesc}[Light]{setColor}{color}  \subsection{Input Classes}
 Set the color of the light.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Light]{setFocalPoint}{position}  
 Set the focal point of the light.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Light]{setPosition}{position}  
 Set the position of the light.  
 \end{methoddesc}  
62    
63  \begin{methoddesc}[Light]{setIntensity}{intesity}  \begin{classdesc}{Image}{}
64  Set the intensity (brightness) of the light.   Displays an image.
 \end{methoddesc}  
   
 The following is a sample code using the \Light class.  
 \fig{fig:light.1} shows the corresponding output.  
 \verbatiminput{../examples/driverlight.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/Light}  
 \end{center}  
 \caption{Light}  
 \label{fig:light.1}  
 \end{figure}  
   
 \section{\Map class}  
 \begin{classdesc}{Map}{scene, data_collector, lut = None}  
 A \Map object shows a scalar field by color on the domain surface.  
65  \end{classdesc}  \end{classdesc}
66    
67  The following is a sample code using the \Map class.  \begin{classdesc}{Text}{}
68  \fig{fig:map.1} shows the corresponding output.   Shows some 2D text.
 \verbatiminput{../examples/drivermap.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/Map}  
 \end{center}  
 \caption{Surface map}  
 \label{fig:map.1}  
 \end{figure}  
   
 \section{\MapOnPlane class}  
 \begin{classdesc}{MapOnPlane}{scene, data_collector, transform, lut = None}  
 A \MapOnPlane object show a scalar field by color on a given plane.  
69  \end{classdesc}  \end{classdesc}
70    
71  The following is a sample code using the \MapOnPlane class.  \begin{classdesc}{DataCollector}{}
72  \fig{fig:maponplane.1} shows the corresponding output.  Deals with the source of data for visualization.
 \verbatiminput{../examples/drivermaponplane.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/MapOnPlane}  
 \end{center}  
 \caption{Surface map on a plane}  
 \label{fig:maponplane.1}  
 \end{figure}  
   
 \section{\MapOnClip class}  
 \begin{classdesc}{MapOnClip}{scene, data_collector, transform, lut = None}  
 A \MapOnClip object show a scalar field by color on a given clip.  
73  \end{classdesc}  \end{classdesc}
74    
75  The following is a sample code using the \MapOnClip class.  %============================================================================================================
76  \fig{fig:maponclip.1} shows the corresponding output.  \subsection{Data Visualization}
77  \verbatiminput{../examples/drivermaponclip.py}  \begin{classdesc}{Map}{}
78     Displays a scalar field using a domain surface.
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/MapOnClip}  
 \end{center}  
 \caption{Surface map on a clip}  
 \label{fig:maponclip.1}  
 \end{figure}  
   
 \section{\MapOnScalarClip class}  
 \begin{classdesc}{MapOnScalarClip}{scene, data_collector, lut = None}  
 A \MapOnScalarClip object show a scalar field by color on a given scalar clip.  
79  \end{classdesc}  \end{classdesc}
80    
81  The following is a sample code using the \MapOnScalarClip class.  \begin{classdesc}{MapOnPlaneCut}{}
82  \fig{fig:maponscalarclip.1} shows the corresponding output.   Displays a scalar field using a domain surface cut on a plane.
 \verbatiminput{../examples/drivermaponscalarclip.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/MapOnScalarClip}  
 \end{center}  
 \caption{Surface map on a scalar clip}  
 \label{fig:maponscalarclip.1}  
 \end{figure}  
   
 \section{\Arrows class}  
 \begin{classdesc}{Arrows}{scene, data_collector, lut = None}  
 A \Arrows object shows a vector field by arrows.  
83  \end{classdesc}  \end{classdesc}
84    
85  The following are the methods available:  \begin{classdesc}{MapOnPlaneClip}{}
86  \begin{methoddesc}[Arrows]{setVectorMode}{vector_mode}   Displays a scalar field using a domain surface clipped
87  Set the arrows vector mode.          on a plane.
 \end{methoddesc}  
   
 \begin{methoddesc}[Arrows]{setScaleMode}{scale_mode}  
 Set the arrows scale mode.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Arrows]{setScaleFactor}{scale_factor}  
 Set the arrows scale factor.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Arrows]{setColorMode}{color_mode}  
 Set the arrows color mode.  
 \end{methoddesc}  
   
 The following is a sample code using the \Arrows class.  
 \fig{fig:arrows.1} shows the corresponding output.  
 \verbatiminput{../examples/driverarrows.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/Arrows}  
 \end{center}  
 \caption{Arrows}  
 \label{fig:arrows.1}  
 \end{figure}  
   
 \section{\ArrowsOnPlane class}  
 \begin{classdesc}{ArrowsOnPlane}{scene, data_collector, transform, lut = None}  
 A \ArrowsOnPlane object shows a vector field by arrows on a given plane.  
88  \end{classdesc}  \end{classdesc}
89    
90  The following is a sample code using the \ArrowsOnPlane class.  \begin{classdesc}{MapOnScalarClip}{}
91  \fig{fig:arrowsonplane.1} shows the corresponding output.   Displays a scalar field using a domain surface clipped
92  \verbatiminput{../examples/driverarrowsonplane.py}          using a scalar value.
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/ArrowsOnPlane}  
 \end{center}  
 \caption{Arrows on a plane}  
 \label{fig:arrowsonplane.1}  
 \end{figure}  
   
 \section{\ArrowsOnClip class}  
 \begin{classdesc}{ArrowsOnClip}{scene, data_collector, transform, lut = None}  
 A \ArrowsOnClip object shows a vector field by arrows on a given clip.  
93  \end{classdesc}  \end{classdesc}
94    
95  The following is a sample code using the \ArrowsOnClip class.  \begin{classdesc}{Velocity}{}
96  \fig{fig:arrowsonclip.1} shows the corresponding output.   Displays a vector field using arrows.
 \verbatiminput{../examples/driverarrowsonclip.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/ArrowsOnClip}  
 \end{center}  
 \caption{Arrows on a clip}  
 \label{fig:arrowsonclip.1}  
 \end{figure}  
   
   
 \section{\IsoSurface class}  
 \begin{classdesc}{IsoSurface}{scene, data_collector, lut = None}  
 An \IsoSurface object shows a scalar field for a given value by an isosurface.  
97  \end{classdesc}  \end{classdesc}
98    
99  The following is the method available:  \begin{classdesc}{VelocityOnPlaneCut}{}
100     Displays a vector field using arrows cut on a plane.
 \begin{methoddesc}[IsoSurface]{setValue}{contour_number, value}  
 Set the contour number and value.  
 \end{methoddesc}  
   
 The following is a sample code using the \IsoSurface class.  
 \fig{fig:isosurface.1} shows the corresponding output.  
 \verbatiminput{../examples/driverisosurface.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/IsoSurface}  
 \end{center}  
 \caption{IsoSurface}  
 \label{fig:isosurface.1}  
 \end{figure}  
   
 \section{\IsoSurfaceOnPlane class}  
 \begin{classdesc}{IsoSurfaceOnPlane}{scene, data_collector, transform,  
 lut = None}  
 An \IsoSurfaceOnPlane object shows a scalar field for a given value  
 by an isosurface on a given plane.  
 \end{classdesc}  
   
 The following is a sample code using the \IsoSurfaceOnPlane class.  
 \fig{fig:isosurfaceonplane.1} shows the corresponding output.  
 \verbatiminput{../examples/driverisosurfaceonplane.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/IsoSurfaceOnPlane}  
 \end{center}  
 \caption{IsoSurface on a plane}  
 \label{fig:isosurfaceonplane.1}  
 \end{figure}  
   
 \section{\IsoSurfaceOnClip class}  
 \begin{classdesc}{IsoSurfaceOnClip}{scene, data_collector, transform,  
 lut = None}  
 An \IsoSurfaceOnClip object shows a scalar field for a given value  
 by an isosurface on a given clip.  
 \end{classdesc}  
   
 The following is a sample code using the \IsoSurfaceOnClip class.  
 \fig{fig:isosurfaceonclip.1} shows the corresponding output.  
 \verbatiminput{../examples/driverisosurfaceonclip.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/IsoSurfaceOnClip}  
 \end{center}  
 \caption{IsoSurface on a clip}  
 \label{fig:isosurfaceonclip.1}  
 \end{figure}  
   
 \section{\Contour class}  
 \begin{classdesc}{Contour}{scene, data_collector, lut = None}  
 A \Contour object shows a scalar field contour surfaces.  
 \end{classdesc}  
   
 The following is the method available:  
 \begin{methoddesc}[Contour]{generateValues}{number_contours, min_range,  
 max_range}  
 Generate the specified number of contours within the specified range.  
 \end{methoddesc}  
   
 The following is a sample code using the \Contour class.  
 \fig{fig:contour.1} shows the corresponding output.  
 \verbatiminput{../examples/drivercontour.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/Contour}  
 \end{center}  
 \caption{Contour}  
 \label{fig:contour.1}  
 \end{figure}  
   
 \section{\ContourOnPlane class}  
 \begin{classdesc}{ContourOnPlane}{scene, data_collector, transform, lut = None}  
 A \ContourOnPlane object shows a scalar field contour surfaces on a given plane.  
101  \end{classdesc}  \end{classdesc}
102    
103  The following is a sample code using the \ContourOnPlane class.  \begin{classdesc}{VelocityOnPlaneClip}{}
104  \fig{fig:contouronplane.1} shows the corresponding output.   Displays a vector field using arrows clipped on a
105  \verbatiminput{../examples/drivercontouronplane.py}          plane.
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/ContourOnPlane}  
 \end{center}  
 \caption{Contour on a plane}  
 \label{fig:contouronplane.1}  
 \end{figure}  
   
 \section{\ContourOnClip class}  
 \begin{classdesc}{ContourOnClip}{scene, data_collector, transform, lut = None}  
 A \ContourOnClip object shows a scalar field contour surfaces on a given clip.  
106  \end{classdesc}  \end{classdesc}
107    
108  The following is a sample code using the \ContourOnClip class.  \begin{classdesc}{Ellipsoid}{}
109  \fig{fig:contouronclip.1} shows the corresponding output.   Displays a tensor field using spheres.
 \verbatiminput{../examples/drivercontouronclip.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/ContourOnClip}  
 \end{center}  
 \caption{Contour on a clip}  
 \label{fig:contouronclip.1}  
 \end{figure}  
   
 \section{\TensorC class}  
 \begin{classdesc}{Tensor}{scene, data_collector, lut = None}  
 A \TensorC object shows a tensor field by ellipsoids.  
110  \end{classdesc}  \end{classdesc}
111    
112  The following are the methods available:  \begin{classdesc}{EllipsoidOnPlaneCut}{}
113  \begin{methoddesc}[Tensor]{setThetaResolution}{resolution}   Displays a tensor field using spheres cut on a
114  Set the number of points in the longitude direction.          plane.
115  \end{methoddesc}  \end{classdesc}
   
 \begin{methoddesc}[Tensor]{setPhiResolution}{resolution}  
 Set the number of points in the latitude direction.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Tensor]{setScaleFactor}{scale_factor}  
 Set the tensor scale factor.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Tensor]{setMaxScaleFactor}{max_scale_factor}  
 Set the maximum allowable scale factor.  
 \end{methoddesc}  
116    
117  The following is a sample code using the \TensorC class.  \begin{classdesc}{EllipsoidOnPlaneClip}{}
118  \fig{fig:tensor.1} shows the corresponding output.   Displays a tensor field using spheres clipped
119  \verbatiminput{../examples/drivertensor.py}          on a plane.
120    \end{classdesc}
121    
122  \begin{figure}[ht]          
123  \begin{center}  \begin{classdesc}{Contour}{}
124  \includegraphics[width=40mm]{figures/Tensor}   Shows a scalar field by contour surfaces.
125  \end{center}  \end{classdesc}
 \caption{Tensor}  
 \label{fig:tensor.1}  
 \end{figure}  
126    
127  \section{\TensorOnPlane class}  \begin{classdesc}{ContourOnPlane}{}
128  \begin{classdesc}{TensorOnPlane}{scene, data_collector, transform, lut = None}   Shows a scalar field by contour surfaces on
129  A \TensorOnPlane object shows a tensor field by ellipsoids on a given plane.  a given plane.
130  \end{classdesc}  \end{classdesc}
131    
132  The following is a sample code using the \TensorOnPlane class.  \begin{classdesc}{ContourOnClip}{}
133  \fig{fig:tensoronplane.1} shows the corresponding output.   Shows a scalar field by contour surfaces on
134  \verbatiminput{../examples/drivertensoronplane.py}  a given clip.
135    \end{classdesc}
136    
137  \begin{figure}[ht]  \begin{classdesc}{IsoSurface}{}
138  \begin{center}   Shows a scalar field for a given value by
139  \includegraphics[width=40mm]{figures/TensorOnPlane}  an isosurface.
140  \end{center}  \end{classdesc}
 \caption{Tensor on a plane}  
 \label{fig:tensoronplane.1}  
 \end{figure}  
141    
142  \section{\TensorOnClip class}  \begin{classdesc}{IsoSurfaceOnPlane}{}
143  \begin{classdesc}{TensorOnClip}{scene, data_collector, transform, lut = None}   Shows a scalar field for a given value by
144  A \TensorOnClip object shows a tensor field by ellipsoids on a given clip.  an isosurfaceon a given plane.
145  \end{classdesc}  \end{classdesc}
146    
147  The following is a sample code using the \TensorOnClip class.  \begin{classdesc}{IsoSurfaceOnClip}{}
148  \fig{fig:tensoronclip.1} shows the corresponding output.   Shows a scalar field for a given vlaue by
149  \verbatiminput{../examples/drivertensoronclip.py}  an isosurface on a given clip.
150    \end{classdesc}
151    
152  \begin{figure}[ht]  \begin{classdesc}{StreamLines}{}
153  \begin{center}   Shows the path of particles in a vector field.
154  \includegraphics[width=40mm]{figures/TensorOnClip}  \end{classdesc}
 \end{center}  
 \caption{Tensor on a clip}  
 \label{fig:tensoronclip.1}  
 \end{figure}  
   
 \section{\StreamLines class}  
 \begin{classdesc}{StreamLines}{scene, data_collector, lut = None}  
 A \StreamLines object show the path of particles (within a specified cloud  
 of points) in a vector field.  
 \end{classdesc}  
   
 The following are the methods available:  
 \begin{methoddesc}[StreamLines]{setCloudRadius}{radius}  
 Set the radius for the cloud of points.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setCenter}{position}  
 Set the center for the cloud of points.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setNumberOfPoints}{points}  
 Set the number of points to generate for the cloud of points.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setMaximumPropagationTime}{time}  
 Set the maximum length for the streamlines in unit of time.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setStreamLinesSize}{stream_lines_size}  
 Set the size of the steamlines.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setAccuracy}{accuracy}  
 Set the accuracy for the streamlines.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setIntegrationToBothDirections}{}  
 Set the integration to occur in both directions.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setTubeRadius}{radius}  
 Set the minimum radius of the tube.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setNumberOfSides}{sides}  
 Set the number of sides for the tube.  
 \end{methoddesc}  
   
 \begin{methoddesc}[StreamLines]{setVaryRadiusByVector}{}  
 Set the variation of the tube radius with vector data.  
 \end{methoddesc}  
   
 The following is a sample code using the \StreamLines class.  
 \fig{fig:streamlines.1} shows the corresponding output.  
 \verbatiminput{../examples/driverstreamlines.py}  
155    
156  \begin{figure}[ht]  \begin{classdesc}{Carpet}{}
157  \begin{center}   Shows a scalar field as plane deformated along
 \includegraphics[width=40mm]{figures/StreamLines}  
 \end{center}  
 \caption{StreamLines}  
 \label{fig:streamlines.1}  
 \end{figure}  
   
 \section{\Carpet class}  
 \begin{classdesc}{Carpet}{scene, data_collector, transform, lut = None,  
 deform = None}  
 A \Carpet object shows a scalar/vector field as a plane deformated along  
158  the plane normal.  the plane normal.
159  \end{classdesc}  \end{classdesc}
160    
161  The following is the method available:  \section{Geometry}
162  \begin{methoddesc}[Carpet]{setScaleFactor}{scale_factor}  \begin{classdesc}{Position}{}
163  Set the displancement scale factor.   Defines the x,y and z coordinates rendered object.
 \end{methoddesc}  
   
 The following is a sample code using the \Carpet class.  
 \fig{fig:carpet.1} shows the corresponding output.  
 \verbatiminput{../examples/drivercarpet.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=40mm]{figures/Carpet}  
 \end{center}  
 \caption{Carpet}  
 \label{fig:carpet.1}  
 \end{figure}  
   
   
 \section{\Position class}  
 \begin{classdesc}{Position}{x_coor, y_coor, z_coor}  
 A \Position object defines the x, y and z coordinates of rendered object.  
164  \end{classdesc}  \end{classdesc}
165    
 \section{\Transform class}  
166  \begin{classdesc}{Transform}{}  \begin{classdesc}{Transform}{}
167  A \Transform object defines the orientation of rendered object.  Defines the orientation of rendered object.
168  \end{classdesc}  \end{classdesc}
169    
170  The following are some of the methods available:  \begin{classdesc}{Plane}{}
171  \begin{methoddesc}[Transform]{translate}{x_offset, y_offset, z_offset}  Defines the cutting/clipping of rendered objects.
172  Translate the rendered object along the x, y and z-axes.  \end{classdesc}
 \end{methoddesc}  
   
 \begin{methoddesc}[Transform]{rotateX}{angle}  
 Rotate the rendered object along the x-axis.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Transform]{rotateY}{angle}  
 Rotate the rendered object along the y-axis.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Transform]{rotateZ}{angle}  
 Rotate the rendered object along the z-axis.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Transform]{xyPlane}{offset = 0}  
 Set the plane orthogonal to the z-axis.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Transform]{yzPlane}{offset = 0}  
 Set the plane orthogonal to the x-axis.  
 \end{methoddesc}  
173    
 \begin{methoddesc}[Transform]{xzPlane}{offset = 0}  
 Set the plane orthogonal to the y-axis.  
 \end{methoddesc}  
174    
175  \section{\Style class}  \subsection{Beautification}
176  \begin{classdesc}{Style}{}  \begin{classdesc}{Style}{}
177  A \Style object defines the style of text.  Defines the style of text.
178  \end{classdesc}  \end{classdesc}
179    
 The following are the methods available:  
 \begin{methoddesc}[Style]{setFontFamily}{family}  
 Set the font family (i.e. Times)  
 \end{methoddesc}  
   
 \begin{methoddesc}[Style]{boldOn}{}  
 Bold the text.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Style]{italicOn}{}  
 Italize the text.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Style]{shadowOn}{}  
 Apply shadows on the text.  
 \end{methoddesc}  
   
 \begin{methoddesc}[Style]{setColor}{}  
 Set the text color.  
 \end{methoddesc}  
   
 \section{\BlueToRed class}  
180  \begin{classdesc}{BlueToRed}{}  \begin{classdesc}{BlueToRed}{}
181  A \BlueToRed object defines a map spectrum from blue to red.   Defines a map spectrum from blue to red.
182  \end{classdesc}  \end{classdesc}
183    
 \section{\RedToBlue class}  
184  \begin{classdesc}{RedToBlue}{}  \begin{classdesc}{RedToBlue}{}
185  A \RedToBlue object defines a map spectrum from red to blue.   Defines a map spectrum from red to blue.
186  \end{classdesc}  \end{classdesc}
187    %===========================================
188    
189  \section{\Plane class}  \section{Rendering}
190  The following are the methods available:  same word on rendering, off-line, on-line, how to rotate, zoom, close the window, ...
 \begin{methoddesc}[Plane]{setPlaneOrigin}{position}  
 Set the plane origin  
 \end{methoddesc}  
   
 \begin{methoddesc}[Plane]{setPlaneNormal}{position}  
 Set the plane normal  
 \end{methoddesc}  
   
 \begin{methoddesc}[Plane]{setValue}{clipping_value}  
 Set the clipping value  
 \end{methoddesc}  
   
 \begin{methoddesc}[Plane]{setInsideOutOn}{}  
 Set the clipping to inside out  
 \end{methoddesc}  
   
 \begin{methoddesc}[Plane]{setInsideOutOff}{}  
 Disable the inside out clipping  
 \end{methoddesc}  
   
 \section{Additional Notes}  
 The following is a sample code rendering multiple planes.  
 \fig{fig:multipleplanes.1} shows the corresponding output.  
 \verbatiminput{../examples/drivermultipleplanes.py}  
   
 \begin{figure}[ht]  
 \begin{center}  
 \includegraphics[width=60mm]{figures/MultiplePlanes}  
 \end{center}  
 \caption{Multiple planes}  
 \label{fig:multipleplanes.1}  
 \end{figure}  
   
 The following is a sample code rendering multiple cuts.  
 \verbatiminput{../examples/drivermultiplecuts.py}  
   
   
 The following is a sample code rendering multiple reads from multiple files.  
 \verbatiminput{../examples/drivermultiplereads.py}  
191    
192    %==============================================
193    \section{How to Make a Movie}

Legend:
Removed from v.886  
changed lines
  Added in v.1002

  ViewVC Help
Powered by ViewVC 1.1.26