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