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 |
\pyvisi provides an easy to use interface to the \VTK visualization |
an easy to use interface to the \VTK library (\VTKUrl). There are three forms |
10 |
tool. \pyvisi provides the following modules: |
of rendering an object: (1) online: a single rendered object is displayed and |
11 |
|
interaction (i.e. zoom and rotate) can occur, (2) offline: multiple rendered |
12 |
\begin{itemize} |
objects are not displayed but are instead saved as a series of images. No |
13 |
\item \Scene: Shows a scene in which components are to be displayed. |
interaction can occur and (3) animate: similar to offline except that multiple |
14 |
\item \Image: Shows an image. |
rendered objects are displayed one after another (animated on-the-fly) and |
15 |
\item \Text: Shows some 2D text. |
no images are saved. No interaction can occur. |
16 |
\item \DataCollector: Deals with data for visualization. |
|
17 |
\item \Camera: Controls the camera manipulation. |
The general rule of thumb when using \pyvisi is to perform the following |
18 |
\item \Light: Controls the light manipulation. |
in sequence: |
19 |
\item \Map: Shows a scalar field by color on the domain surface. |
|
20 |
\item \MapOnPlane: Shows a scalar field by color on a given plane. |
\begin{enumerate} |
21 |
\item \MapOnClip: Shows a scalar field by color on a given clip. |
\item Create a scene instance (i.e. \Scene), which is a window in which objects are to be |
22 |
\item \MapOnScalarClip: Shows a scalar field by color on a give scalar clip. |
rendered on. |
23 |
\item \Arrows: Shows a vector field by arrows. |
\item Create an input instance (i.e. \DataCollector), which reads and loads |
24 |
\item \ArrowsOnPlane: Shows a vector field by arrows on a given plane. |
the source data for visualization. |
25 |
\item \ArrowsOnClip: Shows a vector field by arrows on a given clip. |
\item Create a data visualization instance (i.e. \Map, \Velocity, \Ellipsoid, |
26 |
\item \IsoSurface: Shows a scalar field for a given value by |
\Contour and \Carpet), which proccesses and manipulates the source data. |
27 |
an isosurface. |
\item Create a camera (i.e. \Camera) instance, which controls the viewing angle. |
28 |
\item \IsoSurfaceOnPlane: Shows a scalar field for a given value by |
\item Lastly, render the object online, offline or animate. |
29 |
an isosurfaceon a given plane. |
\end{enumerate} |
30 |
\item \IsoSurfaceOnClip: Shows a scalar field for a given vlaue by |
\begin{center} |
31 |
an isosurface on a given clip. |
\begin{math} |
32 |
\item \Contour: Shows a scalar field by contour surfaces. |
scene \rightarrow input \rightarrow visualization \rightarrow |
33 |
\item \ContourOnPlane: Shows a scalar field by contour surfaces on |
camera \rightarrow render |
34 |
a given plane. |
\end{math} |
35 |
\item \ContourOnClip: Shows a scalar field by contour surfaces on |
\end{center} |
36 |
a given clip. |
|
37 |
\item \TensorC: Shows a tensor field by ellipsoids. |
The sequence in which instances are created is very important due to |
38 |
\item \TensorOnPlane: Shows a tensor field by ellipsoids on |
to the dependencies among them. For example, an input instance must |
39 |
a given plane. |
always be created BEFORE a data visualisation instance is created. |
40 |
\item \TensorOnClip: Shows a tensor field by ellipsoids on a given clip. |
If the sequence is switched, the program will throw an error because a |
41 |
\item \StreamLines: Shows the path of particles in a vector field. |
source data needs to be specified before the data can be |
42 |
\item \Carpet: Shows a scalar field as plane deformated along |
manipulated. Similarly, a camera instance must always be created |
43 |
the plane normal. |
AFTER an input instance has been created. Otherwise, the program will throw |
44 |
\item \Position: Defines the x,y and z coordinates rendered object. |
an error because the camera instance needs to calculate its |
45 |
\item \Transform: Defines the orientation of rendered object. |
default position (automatically carried out in the background) based on |
46 |
\item \Style: Defines the style of text. |
the source data. |
47 |
\item \BlueToRed: Defines a map spectrum from blue to red. |
|
48 |
\item \RedToBlue: Defines a map spectrum from red to blue. |
\section{\pyvisi Classes} |
49 |
\item \Plane: Defines the cutting/clipping of rendered objects. |
The following subsections give a brief overview of the important classes |
50 |
\end{itemize} |
and some of their corresponding methods. Please refer to \ReferenceGuide for |
51 |
|
full details. |
52 |
\section{\Scene class} |
|
53 |
\begin{classdesc}{Scene}{renderer, x_size = 500, y_size = 500} |
|
54 |
A \Scene object creates a window onto which objects are to be displayed. |
%############################################################################# |
55 |
\end{classdesc} |
|
56 |
|
|
57 |
The following are the methods available: |
\subsection{Scene Classes} |
58 |
\begin{methoddesc}[Scene]{saveImage}{image_name} |
This subsection details the instances used to setup the viewing environment. |
59 |
Save the rendered object as an image off-screen. |
|
60 |
\end{methoddesc} |
\subsubsection{\Scene class} |
61 |
|
|
62 |
\begin{methoddesc}[Scene]{render}{} |
\begin{classdesc}{Scene}{renderer = Renderer.ONLINE, num_viewport = 1, |
63 |
Render the object on-screen. |
x_size = 1152, y_size = 864} |
64 |
\end{methoddesc} |
A scene is a window in which objects are to be rendered on. Only |
65 |
|
one scene needs to be created and can display data from one source. However, |
66 |
The following is a sample code using the \Scene class: |
a scene may be divided into four smaller windows called viewports (if needed). |
67 |
\verbatiminput{../examples/driverscene.py} |
The four viewports in turn can display data from four different sources. |
|
|
|
|
\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] |
|
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Image} |
|
|
\end{center} |
|
|
\caption{Image} |
|
|
\label{fig:image.1} |
|
|
\end{figure} |
|
|
|
|
|
\section{\Text class} |
|
|
\begin{classdesc}{Text}{scene} |
|
|
A \Text object shows 2D text. |
|
68 |
\end{classdesc} |
\end{classdesc} |
69 |
|
|
70 |
The following are the methods available: |
The following are some of the methods available: |
71 |
\begin{methoddesc}[Text]{setText}{text} |
\begin{methoddesc}[Scene]{setBackground}{color} |
72 |
Set the text. |
Set the background color of the scene. |
73 |
\end{methoddesc} |
\end{methoddesc} |
74 |
|
|
75 |
\begin{methoddesc}[Text]{setPosition}{x_coor, y_coor} |
\begin{methoddesc}[Scene]{saveImage}{image_name} |
76 |
Set the display position of the text. |
Save the rendered object as an image offline. No interaction can occur. |
77 |
\end{methoddesc} |
\end{methoddesc} |
78 |
|
|
79 |
\begin{methoddesc}[Text]{setStyle}{style} |
\begin{methoddesc}[Scene]{animate}{} |
80 |
Set the style of the text. |
Animate the rendered object on-the-fly. No interaction can occur. |
81 |
\end{methoddesc} |
\end{methoddesc} |
82 |
|
|
83 |
The following is a sample code using the \Text class. |
\begin{methoddesc}[Scene]{render}{} |
84 |
\fig{fig:text.1} shows the corresponding output. |
Render the object online. Interaction can occur. |
|
\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. |
|
|
\end{classdesc} |
|
|
|
|
|
The following are the methods available: |
|
|
\begin{methoddesc}[DataCollector]{setFileName}{file_name} |
|
|
Set the file name from which data is to be read. |
|
85 |
\end{methoddesc} |
\end{methoddesc} |
86 |
|
|
87 |
The following is a sample code using the \DataCollector class. |
\subsubsection{\Camera class} |
|
\fig{fig:datacollector.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverdatacollector.py} |
|
88 |
|
|
89 |
\begin{figure}[ht] |
\begin{classdesc}{Camera}{scene, data_collector, viewport = Viewport.SOUTH_WEST} |
90 |
\begin{center} |
A camera controls the display angle of the rendered object and one is |
91 |
\includegraphics[width=40mm]{figures/DataCollector} |
usually created for a \Scene. However, if a \Scene has four viewports, then a |
92 |
\end{center} |
separate camera may be created for each viewport. |
|
\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. |
|
93 |
\end{classdesc} |
\end{classdesc} |
94 |
|
|
95 |
The following are some of the methods available: |
The following are some of the methods available: |
101 |
Set the position of the camera. |
Set the position of the camera. |
102 |
\end{methoddesc} |
\end{methoddesc} |
103 |
|
|
104 |
|
\begin{methoddesc}[Camera]{setClippingRange}{near_clipping, far_clipping} |
105 |
|
Set the near and far clipping plane of the camera. |
106 |
|
\end{methoddesc} |
107 |
|
|
108 |
|
\begin{methoddesc}[Camera]{setViewUp}{position} |
109 |
|
Set the view up direction of the camera. |
110 |
|
\end{methoddesc} |
111 |
|
|
112 |
\begin{methoddesc}[Camera]{azimuth}{angle} |
\begin{methoddesc}[Camera]{azimuth}{angle} |
113 |
Rotate the camera to the left and right. |
Rotate the camera to the left and right. |
114 |
\end{methoddesc} |
\end{methoddesc} |
115 |
|
|
116 |
\begin{methoddesc}[Camera]{elevation}{angle} |
\begin{methoddesc}[Camera]{elevation}{angle} |
117 |
Rotate the camera to the top and bottom. |
Rotate the camera to the top and bottom (only between -90 and 90). |
|
\end{methoddesc} |
|
|
|
|
|
\begin{methoddesc}[Camera]{roll}{angle} |
|
|
Roll the camera to the left and right. |
|
118 |
\end{methoddesc} |
\end{methoddesc} |
119 |
|
|
120 |
\begin{methoddesc}[Camera]{backView}{} |
\begin{methoddesc}[Camera]{backView}{} |
121 |
View the back of the rendered object. |
Rotate the camera to view the back of the rendered object. |
122 |
\end{methoddesc} |
\end{methoddesc} |
123 |
|
|
124 |
\begin{methoddesc}[Camera]{topView}{} |
\begin{methoddesc}[Camera]{topView}{} |
125 |
View the top of the rendered object. |
Rotate the camera to view the top of the rendered object. |
126 |
\end{methoddesc} |
\end{methoddesc} |
127 |
|
|
128 |
\begin{methoddesc}[Camera]{bottomView}{} |
\begin{methoddesc}[Camera]{bottomView}{} |
129 |
View the bottom of the rendered object. |
Rotate the camera to view the bottom of the rendered object. |
130 |
\end{methoddesc} |
\end{methoddesc} |
131 |
|
|
132 |
\begin{methoddesc}[Camera]{leftView}{} |
\begin{methoddesc}[Camera]{leftView}{} |
133 |
View the left side of the rendered object. |
Rotate the camera to view the left side of the rendered object. |
134 |
\end{methoddesc} |
\end{methoddesc} |
135 |
|
|
136 |
\begin{methoddesc}[Camera]{rightView}{} |
\begin{methoddesc}[Camera]{rightView}{position} |
137 |
View the right side of the rendered object. |
Rotate the camera to view the right side of the rendered object. |
138 |
\end{methoddesc} |
\end{methoddesc} |
139 |
|
|
140 |
\begin{methoddesc}[Camera]{isometricView}{} |
\begin{methoddesc}[Camera]{isometricView}{position} |
141 |
View the isometric side of the rendered object. |
Rotate the camera to view the isometric angle of the rendered object. |
142 |
\end{methoddesc} |
\end{methoddesc} |
143 |
|
|
144 |
The following is a sample code using the \Camera class. |
\begin{methoddesc}[Camera]{dolly}{distance} |
145 |
\fig{fig:camera.1} shows the corresponding output. |
Move the camera towards (greater than 1) and away (less than 1) from |
146 |
\verbatiminput{../examples/drivercamera.py} |
the rendered object. |
147 |
|
\end{methoddesc} |
148 |
|
|
149 |
\begin{figure}[ht] |
\subsubsection{\Light class} |
|
\begin{center} |
|
|
\includegraphics[width=30mm]{figures/Camera} |
|
|
\end{center} |
|
|
\caption{Camera manipulation} |
|
|
\label{fig:camera.1} |
|
|
\end{figure} |
|
150 |
|
|
151 |
\section{\Light class} |
\begin{classdesc}{Light}{scene, data_collector, viewport = Viewport.SOUTH_WEST} |
152 |
\begin{classdesc}{Light}{scene, data_collector} |
A light controls the source of light for the rendered object and works in |
153 |
A \Light object controls the light's settings. |
a similar way to \Camera. |
154 |
\end{classdesc} |
\end{classdesc} |
155 |
|
|
156 |
The following are the methods available: |
The following are some of the methods available: |
157 |
\begin{methoddesc}[Light]{setColor}{color} |
\begin{methoddesc}[Light]{setColor}{color} |
158 |
Set the color of the light. |
Set the light color. |
159 |
\end{methoddesc} |
\end{methoddesc} |
160 |
|
|
161 |
\begin{methoddesc}[Light]{setFocalPoint}{position} |
\begin{methoddesc}[Light]{setFocalPoint}{position} |
163 |
\end{methoddesc} |
\end{methoddesc} |
164 |
|
|
165 |
\begin{methoddesc}[Light]{setPosition}{position} |
\begin{methoddesc}[Light]{setPosition}{position} |
166 |
Set the position of the light. |
Set the position of the camera. |
167 |
\end{methoddesc} |
\end{methoddesc} |
168 |
|
|
169 |
\begin{methoddesc}[Light]{setIntensity}{intesity} |
\begin{methoddesc}[Light]{setAngle}{elevation = 0, azimuth = 0} |
170 |
Set the intensity (brightness) of the light. |
An alternative to set the position and focal point of the light using the |
171 |
|
elevation and azimuth degrees. |
172 |
\end{methoddesc} |
\end{methoddesc} |
173 |
|
|
|
The following is a sample code using the \Light class. |
|
|
\fig{fig:light.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverlight.py} |
|
174 |
|
|
175 |
\begin{figure}[ht] |
%############################################################################## |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Light} |
|
|
\end{center} |
|
|
\caption{Light} |
|
|
\label{fig:light.1} |
|
|
\end{figure} |
|
176 |
|
|
|
\section{\Map class} |
|
|
\begin{classdesc}{Map}{scene, data_collector, lut = None} |
|
|
A \Map object shows a scalar field by color on the domain surface. |
|
|
\end{classdesc} |
|
177 |
|
|
178 |
The following is a sample code using the \Map class. |
\subsection{Input Classes} |
179 |
\fig{fig:map.1} shows the corresponding output. |
This subsection details the instances used to read and load the source data |
180 |
\verbatiminput{../examples/drivermap.py} |
for visualization. |
181 |
|
|
182 |
\begin{figure}[ht] |
\subsubsection{\DataCollector class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Map} |
|
|
\end{center} |
|
|
\caption{Surface map} |
|
|
\label{fig:map.1} |
|
|
\end{figure} |
|
183 |
|
|
184 |
\section{\MapOnPlane class} |
\begin{classdesc}{DataCollector}{source = Source.XML} |
185 |
\begin{classdesc}{MapOnPlane}{scene, data_collector, transform, lut = None} |
% need to say something about the escript object not just d xml file. |
186 |
A \MapOnPlane object show a scalar field by color on a given plane. |
A data collector is used to read data from an XML file or from |
187 |
|
an escript object directly. Please note that a separate data collector needs |
188 |
|
to be created when two or more attributes of the same type from |
189 |
|
the same file needs to be specified (i.e.two scalar attributes from a file). |
190 |
\end{classdesc} |
\end{classdesc} |
191 |
|
|
192 |
The following is a sample code using the \MapOnPlane class. |
The following are some of the methods available: |
193 |
\fig{fig:maponplane.1} shows the corresponding output. |
\begin{methoddesc}[DataCollector]{setFileName}{file_name} |
194 |
\verbatiminput{../examples/drivermaponplane.py} |
Set the XML source file name to be read. |
195 |
|
\end{methoddesc} |
196 |
|
|
197 |
\begin{figure}[ht] |
\begin{methoddesc}[DataCollector]{setData}{**args} |
198 |
\begin{center} |
Create data using the \textless name\textgreater=\textless data\textgreater |
199 |
\includegraphics[width=40mm]{figures/MapOnPlane} |
pairing. Assumption is made that the data will be given in the |
200 |
\end{center} |
appropriate format. |
201 |
\caption{Surface map on a plane} |
\end{methoddesc} |
|
\label{fig:maponplane.1} |
|
|
\end{figure} |
|
202 |
|
|
203 |
\section{\MapOnClip class} |
\begin{methoddesc}[DataCollector]{setActiveScalar}{scalar} |
204 |
\begin{classdesc}{MapOnClip}{scene, data_collector, transform, lut = None} |
Specify the scalar field to load. |
205 |
A \MapOnClip object show a scalar field by color on a given clip. |
\end{methoddesc} |
|
\end{classdesc} |
|
206 |
|
|
207 |
The following is a sample code using the \MapOnClip class. |
\begin{methoddesc}[DataCollector]{setActiveVector}{vector} |
208 |
\fig{fig:maponclip.1} shows the corresponding output. |
Specify the vector field to load. |
209 |
\verbatiminput{../examples/drivermaponclip.py} |
\end{methoddesc} |
210 |
|
|
211 |
\begin{figure}[ht] |
\begin{methoddesc}[DataCollector]{setActiveTensor}{tensor} |
212 |
\begin{center} |
Specify the tensor field to load. |
213 |
\includegraphics[width=40mm]{figures/MapOnClip} |
\end{methoddesc} |
214 |
\end{center} |
|
215 |
\caption{Surface map on a clip} |
\subsubsection{\ImageReader class} |
|
\label{fig:maponclip.1} |
|
|
\end{figure} |
|
216 |
|
|
217 |
\section{\MapOnScalarClip class} |
\begin{classdesc}{ImageReader}{format} |
218 |
\begin{classdesc}{MapOnScalarClip}{scene, data_collector, lut = None} |
An image reader is used to read data from an image in a variety of formats. |
|
A \MapOnScalarClip object show a scalar field by color on a given scalar clip. |
|
219 |
\end{classdesc} |
\end{classdesc} |
220 |
|
|
221 |
The following is a sample code using the \MapOnScalarClip class. |
The following are some of the methods available: |
222 |
\fig{fig:maponscalarclip.1} shows the corresponding output. |
\begin{methoddesc}[ImageReader]{setImageName}{image_name} |
223 |
\verbatiminput{../examples/drivermaponscalarclip.py} |
Set the image name to be read. |
224 |
|
\end{methoddesc} |
225 |
|
|
226 |
\begin{figure}[ht] |
\subsubsection{\TextTwoD class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/MapOnScalarClip} |
|
|
\end{center} |
|
|
\caption{Surface map on a scalar clip} |
|
|
\label{fig:maponscalarclip.1} |
|
|
\end{figure} |
|
227 |
|
|
228 |
\section{\Arrows class} |
\begin{classdesc}{Text2D}{scene, text, viewport = Viewport.SOUTH_WEST} |
229 |
\begin{classdesc}{Arrows}{scene, data_collector, lut = None} |
2D text is used to annotate the rendered object (i.e. adding titles, authors |
230 |
A \Arrows object shows a vector field by arrows. |
and labels). |
231 |
\end{classdesc} |
\end{classdesc} |
232 |
|
|
233 |
The following are the methods available: |
The following are some of the methods available: |
234 |
\begin{methoddesc}[Arrows]{setVectorMode}{vector_mode} |
\begin{methoddesc}[Text2D]{setFontSize}{size} |
235 |
Set the arrows vector mode. |
Set the 2D text size. |
236 |
\end{methoddesc} |
\end{methoddesc} |
237 |
|
|
238 |
\begin{methoddesc}[Arrows]{setScaleMode}{scale_mode} |
\begin{methoddesc}[Text2D]{boldOn}{} |
239 |
Set the arrows scale mode. |
Bold the 2D text. |
240 |
\end{methoddesc} |
\end{methoddesc} |
241 |
|
|
242 |
\begin{methoddesc}[Arrows]{setScaleFactor}{scale_factor} |
\begin{methoddesc}[Text2D]{setColor}{color} |
243 |
Set the arrows scale factor. |
Set the color of the 2D text. |
244 |
\end{methoddesc} |
\end{methoddesc} |
245 |
|
|
246 |
\begin{methoddesc}[Arrows]{setColorMode}{color_mode} |
Including methods from \ActorTwoD. |
|
Set the arrows color mode. |
|
|
\end{methoddesc} |
|
247 |
|
|
|
The following is a sample code using the \Arrows class. |
|
|
\fig{fig:arrows.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/driverarrows.py} |
|
248 |
|
|
249 |
\begin{figure}[ht] |
%############################################################################## |
250 |
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/Arrows} |
|
|
\end{center} |
|
|
\caption{Arrows} |
|
|
\label{fig:arrows.1} |
|
|
\end{figure} |
|
251 |
|
|
252 |
\section{\ArrowsOnPlane class} |
\subsection{Data Visualization Classes} |
253 |
\begin{classdesc}{ArrowsOnPlane}{scene, data_collector, transform, lut = None} |
This subsection details the instances used to process and manipulate the source |
254 |
A \ArrowsOnPlane object shows a vector field by arrows on a given plane. |
data. |
255 |
|
\subsubsection{\Map class} |
256 |
|
|
257 |
|
\begin{classdesc}{Map}{scene, data_collector, |
258 |
|
viewport = Viewport.Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
259 |
|
Class that shows a scalar field on a domain surface. The domain surface |
260 |
|
can either be colored or grey-scaled, depending on the lookup table used. |
261 |
\end{classdesc} |
\end{classdesc} |
262 |
|
|
263 |
The following is a sample code using the \ArrowsOnPlane class. |
The following are some of the methods available:\\ |
264 |
\fig{fig:arrowsonplane.1} shows the corresponding output. |
Methods from \ActorThreeD. |
|
\verbatiminput{../examples/driverarrowsonplane.py} |
|
265 |
|
|
266 |
\begin{figure}[ht] |
\subsubsection{\MapOnPlaneCut class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ArrowsOnPlane} |
|
|
\end{center} |
|
|
\caption{Arrows on a plane} |
|
|
\label{fig:arrowsonplane.1} |
|
|
\end{figure} |
|
267 |
|
|
268 |
\section{\ArrowsOnClip class} |
\begin{classdesc}{MapOnPlaneCut}{scene, data_collector, |
269 |
\begin{classdesc}{ArrowsOnClip}{scene, data_collector, transform, lut = None} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
270 |
A \ArrowsOnClip object shows a vector field by arrows on a given clip. |
This class works in a similar way to \Map, except that it shows a scalar |
271 |
|
field on a plane. The plane can be translated and rotated along the X, Y and |
272 |
|
Z axes. |
273 |
\end{classdesc} |
\end{classdesc} |
274 |
|
|
275 |
The following is a sample code using the \ArrowsOnClip class. |
The following are some of the methods available:\\ |
276 |
\fig{fig:arrowsonclip.1} shows the corresponding output. |
Methods from \ActorThreeD and \Transform. |
|
\verbatiminput{../examples/driverarrowsonclip.py} |
|
277 |
|
|
278 |
\begin{figure}[ht] |
\subsubsection{\MapOnPlaneClip class} |
279 |
\begin{center} |
|
280 |
\includegraphics[width=40mm]{figures/ArrowsOnClip} |
\begin{classdesc}{MapOnPlaneClip}{scene, data_collector, |
281 |
\end{center} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
282 |
\caption{Arrows on a clip} |
This class works in a similar way to \MapOnPlaneCut, except that it shows a |
283 |
\label{fig:arrowsonclip.1} |
scalar field clipped using a plane. |
284 |
\end{figure} |
\end{classdesc} |
285 |
|
|
286 |
|
The following are some of the methods available:\\ |
287 |
|
Methods from \ActorThreeD, \Transform and \Clipper. |
288 |
|
|
289 |
|
\subsubsection{\MapOnScalarClip class} |
290 |
|
|
291 |
\section{\IsoSurface class} |
\begin{classdesc}{MapOnScalarClip}{scene, data_collector, |
292 |
\begin{classdesc}{IsoSurface}{scene, data_collector, lut = None} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
293 |
An \IsoSurface object shows a scalar field for a given value by an isosurface. |
This class works in a similar way to \Map, except that it shows a scalar |
294 |
|
field clipped using a scalar value. |
295 |
\end{classdesc} |
\end{classdesc} |
296 |
|
|
297 |
The following is the method available: |
The following are some of the methods available:\\ |
298 |
|
Methods from \ActorThreeD and \Clipper. |
299 |
|
|
300 |
\begin{methoddesc}[IsoSurface]{setValue}{contour_number, value} |
\subsubsection{\Velocity class} |
|
Set the contour number and value. |
|
|
\end{methoddesc} |
|
301 |
|
|
302 |
The following is a sample code using the \IsoSurface class. |
\begin{classdesc}{Velocity}{scene, data_collector, |
303 |
\fig{fig:isosurface.1} shows the corresponding output. |
viewport = Viewport.SOUTH_WEST, color_mode = ColorMode.VECTOR, |
304 |
\verbatiminput{../examples/driverisosurface.py} |
arrow = Arrow.TWO_D, lut = Lut.COLOR, outline = True} |
305 |
|
Class that shows a vector field using arrows. The arrows can either be |
306 |
|
colored or grey-scaled, depending on the lookup table used. If the arrows |
307 |
|
are colored, there are two possible coloring modes, either using vector data or |
308 |
|
scalar data. Similarly, there are two possible types of arrows, either |
309 |
|
using two-dimensional or three-dimensional. |
310 |
|
\end{classdesc} |
311 |
|
|
312 |
\begin{figure}[ht] |
The following are some of the methods available:\\ |
313 |
\begin{center} |
Methods from \ActorThreeD, \GlyphThreeD and \StructuredPoints. |
|
\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} |
|
314 |
|
|
315 |
\begin{figure}[ht] |
\subsubsection{\VelocityOnPlaneCut class} |
|
\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} |
|
316 |
|
|
317 |
\begin{figure}[ht] |
\begin{classdesc}{VelocityOnPlaneCut}{scene, data_collector, |
318 |
\begin{center} |
arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR, |
319 |
\includegraphics[width=40mm]{figures/IsoSurfaceOnClip} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
320 |
\end{center} |
This class works in a similar way to \MapOnPlaneCut, except that |
321 |
\caption{IsoSurface on a clip} |
it shows a vector field using arrows on a plane. |
|
\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. |
|
322 |
\end{classdesc} |
\end{classdesc} |
323 |
|
|
324 |
The following is the method available: |
The following are some of the methods available:\\ |
325 |
\begin{methoddesc}[Contour]{generateValues}{number_contours, min_range, |
Methods from \ActorThreeD, \GlyphThreeD, \Transform and \StructuredPoints. |
|
max_range} |
|
|
Generate the specified number of contours within the specified range. |
|
|
\end{methoddesc} |
|
326 |
|
|
327 |
The following is a sample code using the \Contour class. |
\subsubsection{\VelocityOnPlaneClip class} |
|
\fig{fig:contour.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercontour.py} |
|
328 |
|
|
329 |
\begin{figure}[ht] |
\begin{classdesc}{VelocityOnPlaneClip}{scene, data_collector, |
330 |
\begin{center} |
arrow = Arrow.TWO_D, color_mode = ColorMode.VECTOR, |
331 |
\includegraphics[width=40mm]{figures/Contour} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, online = True} |
332 |
\end{center} |
This class works in a similar way to \MapOnPlaneClip, except that it shows a |
333 |
\caption{Contour} |
vector field using arrows clipped using a plane. |
334 |
\label{fig:contour.1} |
\end{classdesc} |
|
\end{figure} |
|
335 |
|
|
336 |
\section{\ContourOnPlane class} |
The following are some of the methods available:\\ |
337 |
\begin{classdesc}{ContourOnPlane}{scene, data_collector, transform, lut = None} |
Methods from \ActorThreeD, \GlyphThreeD, \Transform, \Clipper and |
338 |
A \ContourOnPlane object shows a scalar field contour surfaces on a given plane. |
\StructuredPoints. |
339 |
|
|
340 |
|
\subsubsection{\Ellipsoid class} |
341 |
|
|
342 |
|
\begin{classdesc}{Ellipsoid}{scene, data_collector, |
343 |
|
viewport = Viewport = SOUTH_WEST, lut = Lut.COLOR, outline = True} |
344 |
|
Class that shows a tensor field using ellipsoids. The ellipsoids can either be |
345 |
|
colored or grey-scaled, depending on the lookup table used. |
346 |
\end{classdesc} |
\end{classdesc} |
347 |
|
|
348 |
The following is a sample code using the \ContourOnPlane class. |
The following are some of the methods available:\\ |
349 |
\fig{fig:contouronplane.1} shows the corresponding output. |
Methods from \ActorThreeD, \Sphere, \TensorGlyph and \StructuredPoints. |
|
\verbatiminput{../examples/drivercontouronplane.py} |
|
350 |
|
|
351 |
\begin{figure}[ht] |
\subsubsection{\EllipsoidOnPlaneCut class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ContourOnPlane} |
|
|
\end{center} |
|
|
\caption{Contour on a plane} |
|
|
\label{fig:contouronplane.1} |
|
|
\end{figure} |
|
352 |
|
|
353 |
\section{\ContourOnClip class} |
\begin{classdesc}{EllipsoidOnPlaneCut}{scene, data_collector, |
354 |
\begin{classdesc}{ContourOnClip}{scene, data_collector, transform, lut = None} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
355 |
A \ContourOnClip object shows a scalar field contour surfaces on a given clip. |
This class works in a similar way to \MapOnPlaneCut, except that it shows |
356 |
|
a tensor field using ellipsoids cut using a plane. |
357 |
\end{classdesc} |
\end{classdesc} |
358 |
|
|
359 |
The following is a sample code using the \ContourOnClip class. |
The following are some of the methods available:\\ |
360 |
\fig{fig:contouronclip.1} shows the corresponding output. |
Methods from \ActorThreeD, \Sphere, \TensorGlyph, \Transform and |
361 |
\verbatiminput{../examples/drivercontouronclip.py} |
\StructuredPoints. |
362 |
|
|
363 |
\begin{figure}[ht] |
\subsubsection{\EllipsoidOnPlaneClip class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/ContourOnClip} |
|
|
\end{center} |
|
|
\caption{Contour on a clip} |
|
|
\label{fig:contouronclip.1} |
|
|
\end{figure} |
|
364 |
|
|
365 |
\section{\TensorC class} |
\begin{classdesc}{EllipsoidOnPlaneClip}{scene, data_collector, |
366 |
\begin{classdesc}{Tensor}{scene, data_collector, lut = None} |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
367 |
A \TensorC object shows a tensor field by ellipsoids. |
This class works in a similar way to \MapOnPlaneClip, except that it shows a |
368 |
|
tensor field using ellipsoids clipped using a plane. |
369 |
\end{classdesc} |
\end{classdesc} |
370 |
|
|
371 |
|
The following are some of the methods available:\\ |
372 |
|
Methods from \ActorThreeD, \Sphere, \TensorGlyph, \Transform, \Clipper |
373 |
|
and \StructuredPoints. |
374 |
|
|
375 |
The following are the methods available: |
\subsubsection{\Contour class} |
|
\begin{methoddesc}[Tensor]{setThetaResolution}{resolution} |
|
|
Set the number of points in the longitude direction. |
|
|
\end{methoddesc} |
|
376 |
|
|
377 |
\begin{methoddesc}[Tensor]{setPhiResolution}{resolution} |
\begin{classdesc}{Contour}{scene, data_collector, |
378 |
Set the number of points in the latitude direction. |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
379 |
\end{methoddesc} |
Class that shows a scalar field by contour surfaces. The contour surfaces can |
380 |
|
either be colored or grey-scaled, depending on the lookup table used. This |
381 |
|
class can also be used to generate iso surfaces. |
382 |
|
\end{classdesc} |
383 |
|
|
384 |
\begin{methoddesc}[Tensor]{setScaleFactor}{scale_factor} |
The following are some of the methods available:\\ |
385 |
Set the tensor scale factor. |
Methods from \ActorThreeD and \ContourModule. |
|
\end{methoddesc} |
|
386 |
|
|
387 |
\begin{methoddesc}[Tensor]{setMaxScaleFactor}{max_scale_factor} |
\subsubsection{\ContourOnPlaneCut class} |
|
Set the maximum allowable scale factor. |
|
|
\end{methoddesc} |
|
388 |
|
|
389 |
The following is a sample code using the \TensorC class. |
\begin{classdesc}{ContourOnPlaneCut}{scene, data_collector, |
390 |
\fig{fig:tensor.1} shows the corresponding output. |
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
391 |
\verbatiminput{../examples/drivertensor.py} |
This class works in a similar way to \MapOnPlaneCut, except that it shows a |
392 |
|
scalar field by contour surfaces on a plane. |
393 |
|
\end{classdesc} |
394 |
|
|
395 |
\begin{figure}[ht] |
The following are some of the methods available:\\ |
396 |
\begin{center} |
Methods from \ActorThreeD, \ContourModule and \Transform. |
|
\includegraphics[width=40mm]{figures/Tensor} |
|
|
\end{center} |
|
|
\caption{Tensor} |
|
|
\label{fig:tensor.1} |
|
|
\end{figure} |
|
397 |
|
|
398 |
\section{\TensorOnPlane class} |
\subsubsection{\ContourOnPlaneClip class} |
399 |
\begin{classdesc}{TensorOnPlane}{scene, data_collector, transform, lut = None} |
|
400 |
A \TensorOnPlane object shows a tensor field by ellipsoids on a given plane. |
\begin{classdesc}{ContourOnPlaneClip}{scene, data_collector, |
401 |
|
viewport = Viewport.SOUTH_WEST, lut = Lut.COLOR, outline = True} |
402 |
|
This class works in a similar way to \MapOnPlaneClip, except that it shows a |
403 |
|
scalar field by contour surfaces clipped using a plane. |
404 |
\end{classdesc} |
\end{classdesc} |
405 |
|
|
406 |
The following is a sample code using the \TensorOnPlane class. |
The following are some of the methods available:\\ |
407 |
\fig{fig:tensoronplane.1} shows the corresponding output. |
Methods from \ActorThreeD, \ContourModule, \Transform and \Clipper. |
|
\verbatiminput{../examples/drivertensoronplane.py} |
|
408 |
|
|
409 |
\begin{figure}[ht] |
\subsubsection{\StreamLine class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/TensorOnPlane} |
|
|
\end{center} |
|
|
\caption{Tensor on a plane} |
|
|
\label{fig:tensoronplane.1} |
|
|
\end{figure} |
|
410 |
|
|
411 |
\section{\TensorOnClip class} |
\begin{classdesc}{StreamLine}{scene, data_collector, |
412 |
\begin{classdesc}{TensorOnClip}{scene, data_collector, transform, lut = None} |
viewport = Viewport.SOUTH_WEST, color_mode = ColorMode.VECTOR, lut = Lut.COLOR, |
413 |
A \TensorOnClip object shows a tensor field by ellipsoids on a given clip. |
outline = True} |
414 |
|
Class that shows the direction of particles of a vector field using streamlines. |
415 |
|
The streamlines can either be colored or grey-scaled, depending on the lookup |
416 |
|
table used. If the streamlines are colored, there are two possible coloring |
417 |
|
modes, either using vector data or scalar data. |
418 |
\end{classdesc} |
\end{classdesc} |
419 |
|
|
420 |
The following is a sample code using the \TensorOnClip class. |
The following are some of the methods available:\\ |
421 |
\fig{fig:tensoronclip.1} shows the corresponding output. |
Methods from \ActorThreeD, \PointSource, \StreamLineModule and \Tube. |
|
\verbatiminput{../examples/drivertensoronclip.py} |
|
422 |
|
|
423 |
\begin{figure}[ht] |
\subsubsection{\Carpet class} |
424 |
\begin{center} |
|
425 |
\includegraphics[width=40mm]{figures/TensorOnClip} |
\begin{classdesc}{Carpet}{scene, data_collector, |
426 |
\end{center} |
viewport = Viewport.Viewport.SOUTH_WEST, warp_mode = WarpMode.SCALAR, |
427 |
\caption{Tensor on a clip} |
lut = Lut.COLOR, outline = True} |
428 |
\label{fig:tensoronclip.1} |
This class works in a similar way to \MapOnPlaneCut, except that it shows a |
429 |
\end{figure} |
scalar field on a plane deformated (warp) along the normal. The plane can |
430 |
|
either be colored or grey-scaled, depending on the lookup table used. |
431 |
|
Similarly, the plane can be deformated either using scalar data or vector data. |
432 |
|
\end{classdesc} |
433 |
|
|
434 |
|
The following are some of the methods available:\\ |
435 |
|
Methods from \ActorThreeD, \Warp and \Transform. |
436 |
|
|
437 |
|
\subsubsection{\Image class} |
438 |
|
|
439 |
\section{\StreamLines class} |
\begin{classdesc}{Image}{scene, image_reader, viewport = Viewport.SOUTH_WEST} |
440 |
\begin{classdesc}{StreamLines}{scene, data_collector, lut = None} |
Class that displays an image which can be scaled (upwards and downwards). The |
441 |
A \StreamLines object show the path of particles (within a specified cloud |
image can also be translated and rotated along the X, Y and Z axes. |
|
of points) in a vector field. |
|
442 |
\end{classdesc} |
\end{classdesc} |
443 |
|
|
444 |
The following are the methods available: |
The following are some of the methods available:\\ |
445 |
\begin{methoddesc}[StreamLines]{setCloudRadius}{radius} |
Methods from \ActorThreeD, \PlaneSource and \Transform. |
446 |
Set the radius for the cloud of points. |
|
447 |
|
|
448 |
|
%############################################################################## |
449 |
|
|
450 |
|
|
451 |
|
\subsection{Coordiante Classes} |
452 |
|
This subsection details the instances used to position the rendered object. |
453 |
|
|
454 |
|
\begin{classdesc}{LocalPosition}{x_coor, y_coor} |
455 |
|
Class that defines the local positioning coordinate system (2D). |
456 |
|
\end{classdesc} |
457 |
|
|
458 |
|
\begin{classdesc}{GlobalPosition}{x_coor, y_coor, z_coor} |
459 |
|
Class that defines the global positioning coordinate system (3D). |
460 |
|
\end{classdesc} |
461 |
|
|
462 |
|
|
463 |
|
%############################################################################## |
464 |
|
|
465 |
|
|
466 |
|
\subsection{Supporting Classes} |
467 |
|
This subsection details the supporting classes inherited by the data |
468 |
|
visualization classes. These supporting |
469 |
|
|
470 |
|
\subsubsection{\ActorThreeD class} |
471 |
|
|
472 |
|
The following are some of the methods available: |
473 |
|
|
474 |
|
\begin{methoddesc}[Actor3D]{setOpacity}{opacity} |
475 |
|
Set the opacity (transparency) of the 3D actor. |
476 |
\end{methoddesc} |
\end{methoddesc} |
477 |
|
|
478 |
\begin{methoddesc}[StreamLines]{setCenter}{position} |
\begin{methoddesc}[Actor3D]{setColor}{color} |
479 |
Set the center for the cloud of points. |
Set the color of the 3D actor. |
480 |
\end{methoddesc} |
\end{methoddesc} |
481 |
|
|
482 |
\begin{methoddesc}[StreamLines]{setNumberOfPoints}{points} |
\begin{methoddesc}[Actor3D]{setRepresentationToWireframe}{} |
483 |
Set the number of points to generate for the cloud of points. |
Set the representation of the 3D actor to wireframe. |
484 |
\end{methoddesc} |
\end{methoddesc} |
485 |
|
|
486 |
\begin{methoddesc}[StreamLines]{setMaximumPropagationTime}{time} |
\subsubsection{\ActorTwoD class} |
487 |
Set the maximum length for the streamlines in unit of time. |
|
488 |
|
The following are some of the methods available: |
489 |
|
|
490 |
|
\begin{methoddesc}[Actor2D]{setPosition}{position} |
491 |
|
Set the position (XY) of the 2D actor. Default position is the lower left hand |
492 |
|
corner of the window / viewport. |
493 |
\end{methoddesc} |
\end{methoddesc} |
494 |
|
|
495 |
\begin{methoddesc}[StreamLines]{setStreamLinesSize}{stream_lines_size} |
\subsubsection{\Clipper class} |
496 |
Set the size of the steamlines. |
|
497 |
|
The following are some of the methods available: |
498 |
|
|
499 |
|
\begin{methoddesc}[Clipper]{setInsideOutOn}{} |
500 |
|
Clips one side of the rendered object. |
501 |
\end{methoddesc} |
\end{methoddesc} |
502 |
|
|
503 |
\begin{methoddesc}[StreamLines]{setAccuracy}{accuracy} |
\begin{methoddesc}[Clipper]{setInsideOutOff}{} |
504 |
Set the accuracy for the streamlines. |
Clips the other side of the rendered object. |
505 |
\end{methoddesc} |
\end{methoddesc} |
506 |
|
|
507 |
\begin{methoddesc}[StreamLines]{setIntegrationToBothDirections}{} |
\begin{methoddesc}[Clipper]{setClipValue}{value} |
508 |
Set the integration to occur in both directions. |
Set the scalar clip value. |
509 |
\end{methoddesc} |
\end{methoddesc} |
510 |
|
|
511 |
\begin{methoddesc}[StreamLines]{setTubeRadius}{radius} |
\subsubsection{\ContourModule class} |
512 |
Set the minimum radius of the tube. |
|
513 |
|
The following are some of the methods available: |
514 |
|
|
515 |
|
\begin{methoddesc}[ContourModule]{generateContours}{contours, |
516 |
|
lower_range = None, upper_range = None} |
517 |
|
Generate the specified number of contours within the specified range. |
518 |
\end{methoddesc} |
\end{methoddesc} |
519 |
|
|
520 |
\begin{methoddesc}[StreamLines]{setNumberOfSides}{sides} |
\subsubsection{\GlyphThreeD class} |
521 |
Set the number of sides for the tube. |
|
522 |
|
The following are some of the methods available: |
523 |
|
|
524 |
|
\begin{methoddesc}[Glyph3D]{setScaleModeByVector}{} |
525 |
|
Set the 3D glyph to scale according to the vector data. |
526 |
\end{methoddesc} |
\end{methoddesc} |
527 |
|
|
528 |
\begin{methoddesc}[StreamLines]{setVaryRadiusByVector}{} |
\begin{methoddesc}[Glyph3D]{setScaleModeByScalar}{} |
529 |
Set the variation of the tube radius with vector data. |
Set the 3D glyph to scale according to the scalar data. |
530 |
\end{methoddesc} |
\end{methoddesc} |
531 |
|
|
532 |
The following is a sample code using the \StreamLines class. |
\begin{methoddesc}[Glyph3D]{setScaleFactor}{scale_factor} |
533 |
\fig{fig:streamlines.1} shows the corresponding output. |
Set the 3D glyph scale factor. |
534 |
\verbatiminput{../examples/driverstreamlines.py} |
\end{methoddesc} |
535 |
|
|
536 |
\begin{figure}[ht] |
\subsubsection{\TensorGlyph class} |
|
\begin{center} |
|
|
\includegraphics[width=40mm]{figures/StreamLines} |
|
|
\end{center} |
|
|
\caption{StreamLines} |
|
|
\label{fig:streamlines.1} |
|
|
\end{figure} |
|
537 |
|
|
538 |
\section{\Carpet class} |
The following are some of the methods available: |
|
\begin{classdesc}{Carpet}{scene, data_collector, transform, lut = None, |
|
|
deform = None} |
|
|
A \Carpet object shows a scalar/vector field as a plane deformated along |
|
|
the plane normal. |
|
|
\end{classdesc} |
|
539 |
|
|
540 |
The following is the method available: |
\begin{methoddesc}[TensorGlyph]{setScaleFactor}{scale_factor} |
541 |
\begin{methoddesc}[Carpet]{setScaleFactor}{scale_factor} |
Set the scale factor for the tensor glyph. |
|
Set the displancement scale factor. |
|
542 |
\end{methoddesc} |
\end{methoddesc} |
543 |
|
|
544 |
The following is a sample code using the \Carpet class. |
\subsubsection{\PlaneSource class} |
|
\fig{fig:carpet.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivercarpet.py} |
|
545 |
|
|
546 |
\begin{figure}[ht] |
The following are some of the methods available: |
|
\begin{center} |
|
|
\includegraphics[width=50mm]{figures/Carpet} |
|
|
\end{center} |
|
|
\caption{Carpet} |
|
|
\label{fig:carpet.1} |
|
|
\end{figure} |
|
547 |
|
|
548 |
|
\begin{methoddesc}[PlaneSource]{setPoint1}{position} |
549 |
|
Set the first point from the origin of the plane source. |
550 |
|
\end{methoddesc} |
551 |
|
|
552 |
\section{\Position class} |
\begin{methoddesc}[PlaneSource]{setPoint2}{position} |
553 |
\begin{classdesc}{Position}{x_coor, y_coor, z_coor} |
Set the second point from the origin of the plane source. |
554 |
A \Position object defines the x, y and z coordinates of rendered object. |
\end{methoddesc} |
|
\end{classdesc} |
|
555 |
|
|
556 |
\section{\Transform class} |
\subsubsection{\PointSource class} |
|
\begin{classdesc}{Transform}{} |
|
|
A \Transform object defines the orientation of rendered object. |
|
|
\end{classdesc} |
|
557 |
|
|
558 |
The following are some of the methods available: |
The following are some of the methods available: |
559 |
\begin{methoddesc}[Transform]{translate}{x_offset, y_offset, z_offset} |
|
560 |
Translate the rendered object along the x, y and z-axes. |
\begin{methoddesc}[PointSource]{setPointSourceRadius}{radius} |
561 |
|
Set the radius of the sphere. |
562 |
\end{methoddesc} |
\end{methoddesc} |
563 |
|
|
564 |
\begin{methoddesc}[Transform]{rotateX}{angle} |
\begin{methoddesc}[PointSource]{setPointSourceNumberOfPoints}{points} |
565 |
Rotate the rendered object along the x-axis. |
Set the number of points to generate within the sphere (the larger the |
566 |
|
number of points, the more streamlines are generated). |
567 |
\end{methoddesc} |
\end{methoddesc} |
568 |
|
|
569 |
\begin{methoddesc}[Transform]{rotateY}{angle} |
\subsubsection{\StructuredPoints class} |
570 |
Rotate the rendered object along the y-axis. |
|
571 |
|
The following are some of the methods available: |
572 |
|
|
573 |
|
\begin{methoddesc}[StructuredPoints]{setDimension}{x, y, z} |
574 |
|
Set the dimension on the x, y and z axes. The smaller the dimension, |
575 |
|
the more points are populated. |
576 |
\end{methoddesc} |
\end{methoddesc} |
577 |
|
|
578 |
\begin{methoddesc}[Transform]{rotateZ}{angle} |
\subsubsection{\Sphere class} |
579 |
Rotate the rendered object along the z-axis. |
|
580 |
|
The following are some of the methods available: |
581 |
|
|
582 |
|
\begin{methoddesc}[Sphere]{setThetaResolution}{resolution} |
583 |
|
Set the theta resolution of the sphere. |
584 |
\end{methoddesc} |
\end{methoddesc} |
585 |
|
|
586 |
\begin{methoddesc}[Transform]{xyPlane}{offset = 0} |
\begin{methoddesc}[Sphere]{setPhiResolution}{resolution} |
587 |
Set the plane orthogonal to the z-axis. |
Set the phi resoluton of the sphere. |
588 |
\end{methoddesc} |
\end{methoddesc} |
589 |
|
|
590 |
\begin{methoddesc}[Transform]{yzPlane}{offset = 0} |
\subsubsection{\StreamLineModule class} |
591 |
Set the plane orthogonal to the x-axis. |
|
592 |
|
The following are some of the methods available: |
593 |
|
|
594 |
|
\begin{methoddesc}[StreamLineModule]{setMaximumPropagationTime}{time} |
595 |
|
Set the maximum length of the streamline expressed in elapsed time. |
596 |
\end{methoddesc} |
\end{methoddesc} |
597 |
|
|
598 |
\begin{methoddesc}[Transform]{xzPlane}{offset = 0} |
\begin{methoddesc}[StreamLineModule]{setIntegrationToBothDirections}{} |
599 |
Set the plane orthogonal to the y-axis. |
Set the integration to occur both sides: forward (where the streamline |
600 |
|
goes) and backward (where the streamline came from). |
601 |
\end{methoddesc} |
\end{methoddesc} |
602 |
|
|
603 |
\section{\Style class} |
\subsubsection{\Transform class} |
|
\begin{classdesc}{Style}{} |
|
|
A \Style object defines the style of text. |
|
|
\end{classdesc} |
|
604 |
|
|
605 |
The following are the methods available: |
\begin{methoddesc}[Transform]{translate}{x_offset, y_offset, z_offset} |
606 |
\begin{methoddesc}[Style]{setFontFamily}{family} |
Translate the rendered object along the x, y and z-axes. |
|
Set the font family (i.e. Times) |
|
607 |
\end{methoddesc} |
\end{methoddesc} |
608 |
|
|
609 |
\begin{methoddesc}[Style]{boldOn}{} |
\begin{methoddesc}[Transform]{rotateX}{angle} |
610 |
Bold the text. |
Rotate the plane along the x-axis. |
611 |
\end{methoddesc} |
\end{methoddesc} |
612 |
|
|
613 |
\begin{methoddesc}[Style]{italicOn}{} |
\begin{methoddesc}[Transform]{rotateY}{angle} |
614 |
Italize the text. |
Rotate the plane along the y-axis. |
615 |
\end{methoddesc} |
\end{methoddesc} |
616 |
|
|
617 |
\begin{methoddesc}[Style]{shadowOn}{} |
\begin{methoddesc}[Transform]{rotateZ}{angle} |
618 |
Apply shadows on the text. |
Rotate the plane along the z-axis. |
619 |
\end{methoddesc} |
\end{methoddesc} |
620 |
|
|
621 |
\begin{methoddesc}[Style]{setColor}{} |
\begin{methoddesc}[Transform]{setPlaneToXY}{offset = 0} |
622 |
Set the text color. |
Set the plane orthogonal to the z-axis. |
623 |
\end{methoddesc} |
\end{methoddesc} |
624 |
|
|
625 |
\section{\BlueToRed class} |
\begin{methoddesc}[Transform]{setPlaneToYZ}{offset = 0} |
626 |
\begin{classdesc}{BlueToRed}{} |
Set the plane orthogonal to the x-axis. |
627 |
A \BlueToRed object defines a map spectrum from blue to red. |
\end{methoddesc} |
|
\end{classdesc} |
|
|
|
|
|
\section{\RedToBlue class} |
|
|
\begin{classdesc}{RedToBlue}{} |
|
|
A \RedToBlue object defines a map spectrum from red to blue. |
|
|
\end{classdesc} |
|
628 |
|
|
629 |
\section{\Plane class} |
\begin{methoddesc}[Transform]{setPlaneToXZ}{offset = 0} |
630 |
The following are the methods available: |
Set the plane orthogonal to the y-axis. |
|
\begin{methoddesc}[Plane]{setPlaneOrigin}{position} |
|
|
Set the plane origin |
|
631 |
\end{methoddesc} |
\end{methoddesc} |
632 |
|
|
633 |
\begin{methoddesc}[Plane]{setPlaneNormal}{position} |
\subsubsection{\Tube class} |
634 |
Set the plane normal |
|
635 |
|
\begin{methoddesc}[Tube]{setTubeRadius}{radius} |
636 |
|
Set the radius of the tube. |
637 |
\end{methoddesc} |
\end{methoddesc} |
638 |
|
|
639 |
\begin{methoddesc}[Plane]{setValue}{clipping_value} |
\begin{methoddesc}[Tube]{setTubeRadiusToVaryByVector}{} |
640 |
Set the clipping value |
Set the radius of the tube to vary by vector data. |
641 |
\end{methoddesc} |
\end{methoddesc} |
642 |
|
|
643 |
\begin{methoddesc}[Plane]{setInsideOutOn}{} |
\begin{methoddesc}[Tube]{setTubeRadiusToVaryByScalar}{} |
644 |
Set the clipping to inside out |
Set the radius of the tube to vary by scalar data. |
645 |
\end{methoddesc} |
\end{methoddesc} |
646 |
|
|
647 |
\begin{methoddesc}[Plane]{setInsideOutOff}{} |
\subsubsection{\Warp class} |
648 |
Disable the inside out clipping |
|
649 |
|
\begin{methoddesc}[Warp]{setScaleFactor}{scale_factor} |
650 |
|
Set the displacement scale factor. |
651 |
\end{methoddesc} |
\end{methoddesc} |
652 |
|
|
|
\section{Additional Notes} |
|
|
The following is a sample code rendering multiple planes. |
|
|
\fig{fig:multipleplanes.1} shows the corresponding output. |
|
|
\verbatiminput{../examples/drivermultipleplanes.py} |
|
653 |
|
|
654 |
\begin{figure}[ht] |
\section{Online Rendering Mechnism} |
|
\begin{center} |
|
|
\includegraphics[width=60mm]{figures/MultiplePlanes} |
|
|
\end{center} |
|
|
\caption{Multiple planes} |
|
|
\label{fig:multipleplanes.1} |
|
|
\end{figure} |
|
655 |
|
|
|
The following is a sample code rendering multiple cuts. |
|
|
\verbatiminput{../examples/drivermultiplecuts.py} |
|
656 |
|
|
657 |
|
|
658 |
The following is a sample code rendering multiple reads from multiple files. |
same word on rendering, off-line, on-line, how to rotate, zoom, close the window, ... |
|
\verbatiminput{../examples/drivermultiplereads.py} |
|
659 |
|
|
660 |
|
%============================================== |
661 |
|
\section{How to Make a Movie} |