/[escript]/trunk/pyvisi/website/news/news_body.part
ViewVC logotype

Contents of /trunk/pyvisi/website/news/news_body.part

Parent Directory Parent Directory | Revision Log Revision Log


Revision 337 - (show annotations)
Mon Dec 12 01:57:07 2005 UTC (14 years, 2 months ago) by cochrane
File size: 14371 byte(s)
Initial merge of pyvisi into esys repository.
1 <!-- $Id: news_body.part,v 1.16 2005/06/24 00:30:13 paultcochrane Exp $ -->
2 <h1>News</h1>
3
4 <hr class="top" />
5
6 <div class="item">
7 <div class="itemTitle">Arrow plots possible in 3D</div>
8 <div class="itemDate">22-Jun-2005</div>
9 <div class="itemAuthor">Paul Cochrane</div>
10
11 <div class="itemText">
12 <p>
13 After some work on some other stuff I've finally managed to add
14 more functionality to pyvisi! This time one can do ArrowPlots in
15 three dimensions using vtk. The povray renderer module can also
16 be used to generate ArrowPlots, but work is still needed to get it
17 going nicely. It is also possible to use the vtk as well as the
18 gnuplot renderer modules to do 2D ArrowPlots. The new class is
19 called ArrowPlot3D, but may be changed to just ArrowPlot in
20 future, and one can let pyvisi work out which one you want to use.
21 </p>
22 <p>
23 There have been many other changes made as well, with a little
24 internal reorganisation of examples and a few other things, but
25 this is the main change of interest at present.
26 </p>
27 <p>
28 An example code has been added to the <code>examples/</code>
29 directory on the cvs and will be in the next distribution of the
30 package. It is called:
31 <ul>
32 <li><code>arrowPlot3D.py</code></li>
33 </ul>
34 </p>
35 </div>
36 </div>
37
38 <div class="item">
39 <div class="itemTitle">Ball plots now available</div>
40 <div class="itemDate">19-Apr-2005</div>
41 <div class="itemAuthor">Paul Cochrane</div>
42
43 <div class="itemText">
44 <p>
45 It is now possible to create plots of spheres in space, i.e.
46 BallPlots. This at present is only possible with a vtk xml data
47 file.
48 </p>
49 <p>
50 An example code has been added to <code>examples/</code> directory on
51 the cvs and may be in the next distribution of the package. It is
52 called:
53 <ul>
54 <li><code>ballPlotExample.py</code></li>
55 </ul>
56 </p>
57 </div>
58 </div>
59
60 <div class="item">
61 <div class="itemTitle">Movies from sequences of images</div>
62 <div class="itemDate">07-Mar-2005</div>
63 <div class="itemAuthor">Paul Cochrane</div>
64
65 <div class="itemText">
66 <p>
67 I've changed the internal way that objects are handled so that one
68 can now create sequences of images, and hence movies of functions
69 which change over the course of a simulation. This, however, has
70 made other parts of the interface slightly different, and one must
71 now call <code>setData()</code> just before each
72 <code>render()</code> or <code>save()</code> call, this I think
73 isn't very good and so this syntax requirement will be removed in
74 the future, when I get around to implementing the
75 <code>Renderer</code> object properly. Until then though, one is
76 able to make movies from the data!
77 </p>
78 <p>
79 Two new examples are in the <code>examples/</code> directory on
80 the cvs and will be in the next distribution of the package. They
81 are:
82 <ul>
83 <li><code>simplePlotMovieExample.py</code></li>
84 <li><code>contourPlotMovieExample.py</code></li>
85 </ul>
86 </p>
87 </div>
88 </div>
89
90 <div class="item">
91 <div class="itemTitle">ArrowPlots available in gnuplot</div>
92 <div class="itemDate">07-Mar-2005</div>
93 <div class="itemAuthor">Paul Cochrane</div>
94
95 <div class="itemText">
96 <p>
97 I've added a very basic implementation of 2D vector field plots
98 for the gnuplot renderer module. Have a look at the new examples
99 in the pyvisi cvs (soon to be in the distribution):
100 <ul>
101 <li><code>arrowPlotExample.py</code></li>
102 <li><code>arrowPlotExample2.py</code></li>
103 </ul>
104 </p>
105 </div>
106 </div>
107
108 <div class="item">
109 <div class="itemTitle">More plotting types added for gnuplot
110 renderer module</div>
111 <div class="itemDate">24-Feb-2005</div>
112 <div class="itemAuthor">Paul Cochrane</div>
113
114 <div class="itemText">
115 <p>
116 I've now been able to add many more kinds of plotting object to
117 the gnuplot renderer module. Now one can plot 2D contour maps of
118 3D data (see item from yesterday), one can plot 3D surfaces,
119 3D surfaces with a 2D projection of the surface contours onto the
120 base of the axes, and 2D and 3D scatter data (good to use when the
121 input data isn't on a grid). Extra examples have been added,
122 namely:
123 <ul>
124 <li><code>surfacePlotExample.py</code></li>
125 <li><code>surfaceAndContourPlotExample.py</code></li>
126 <li><code>scatterPlotExample.py</code></li>
127 <li><code>scatterPlot3DExample.py</code></li>
128 </ul>
129 </p>
130 </div>
131 </div>
132
133 <div class="item">
134 <div class="itemTitle">Contour plotting works in gnuplot</div>
135 <div class="itemDate">23-Feb-2005</div>
136 <div class="itemAuthor">Paul Cochrane</div>
137
138 <div class="itemText">
139 <p>
140 Since objects can now render themselves, it was possible to
141 implement the different rendering code necessary for contour plots
142 to work in gnuplot. Have a look at the file
143 <code>contourPlotExample.py</code> in the <code>examples</code>
144 directory of the pyvisi cvs to see it in action. It is likely to
145 take a while to get the vtk version going, but it will come in the
146 fullness of time.
147 </p>
148 </div>
149 </div>
150
151 <div class="item">
152 <div class="itemTitle">Objects render themselves</div>
153 <div class="itemDate">23-Feb-2005</div>
154 <div class="itemAuthor">Paul Cochrane</div>
155
156 <div class="itemText">
157 <p>
158 Objects now render themselves. Therefore, there is no longer a
159 reason to call the <code>render()</code> method of a scene's
160 sub-object directly; this is taken care of when the
161 <code>render()</code> method of the scene is called. The example
162 code has been changed in the cvs, and so look for the updated
163 versions of the examples in the second release of the pre-alpha
164 version of pyvisi.
165 </p>
166 </div>
167 </div>
168
169 <div class="item">
170 <div class="itemTitle">First release of pre-alpha version of pyvisi</div>
171 <div class="itemDate">08-Feb-2005</div>
172 <div class="itemAuthor">Paul Cochrane</div>
173
174 <div class="itemText">
175 <p>
176 After much cleaning of the code with the help of <a
177 href="http://pylint.sourceforge.net">pylint</a>, and updating
178 READMEs and stuff, I've released the first pre-alpha version of
179 pyvisi. This is a very limited functionality version, but is
180 something for people to see how things will look, and for me to
181 get some kind of feedback from people to how they would like it to
182 look and behave. There are three examples that work at present,
183 these are <code>simplePlotExample.py</code>,
184 <code>singleArrayPlotExample.py</code>, and
185 <code>multiPlotExample.py</code>. These examples show the current
186 functionality possible with pyvisi, and what the gnuplot and vtk
187 equivalent code is.
188 </p>
189 <p>
190 <strong>Download</strong>: you can download pyvisi from the
191 sourceforge.net web site by visiting <a
192 href="http://sourceforge.net/project/showfiles.php?group_id=124511">pyvisi download files page</a>
193 </p>
194 </div>
195 </div>
196
197 <div class="item">
198 <div class="itemTitle">Scenes can now be saved to file</div>
199 <div class="itemDate">24-Jan-2005</div>
200 <div class="itemAuthor">Paul Cochrane</div>
201
202 <div class="itemText">
203 <p>
204 It is now possible to save the scenes that you have rendered!
205 Previously, scenes were displayed to the screen and that was all,
206 however now the <code>Scene.save()</code> method has been
207 implemented in both the <a
208 href="http://www.gnuplot.info">gnuplot</a> and <a
209 href="http://www.vtk.org">vtk</a> renderer modules. The
210 syntax of the <code>save()</code> method will change (in that the
211 <code>format</code> argument will become an object), nevertheless,
212 one is now actually able to save one's work.
213 </p>
214 <p>
215 The gnuplot renderer module can handle png and postscript output
216 at present. With gnuplot 4.0 more output formats will be
217 available.
218 </p>
219 <p>
220 The vtk renderer module can handle png, postscript, jpeg, bmp,
221 pnm, and tiff formats.
222 </p>
223 </div>
224 </div>
225
226 <div class="item">
227 <div class="itemTitle">Multiple curves on 2D plots are now possible</div>
228 <div class="itemDate">24-Jan-2005</div>
229 <div class="itemAuthor">Paul Cochrane</div>
230
231 <div class="itemText">
232 <p>
233 Pyvisi now supports plotting multiple datasets when graphing 2D
234 curves. To plot more than one curve on a given
235 <code>LinePlot</code>, one uses the syntax: <code>plot.setData(x,
236 y1, y2, y3, ...)</code>. The first element in the argument
237 list is assumed to the x data to plot the subsequent arrays
238 against, except in the case that there is only one array in the
239 argument list, in which case the x data is autogenerated as the
240 indices (starting from 1 (maybe this should be zero??)) of the
241 argument data array.
242 </p>
243 <p>
244 To have a look at multiple curves in action, have a look at
245 <code>multiCurvePlotExample.py</code> in the
246 <code>examples/</code> directory of the pyvisi distribution.
247 </p>
248 </div>
249 </div>
250
251 <div class="item">
252 <div class="itemTitle">Simple 2D contour plotting not far away</div>
253 <div class="itemDate">24-Jan-2005</div>
254 <div class="itemAuthor">Paul Cochrane</div>
255
256 <div class="itemText">
257 <p>
258 Implementing simple contour plotting with just the <a
259 href="http://www.gnuplot.info">gnuplot</a> renderer module has
260 shown a couple of major holes that need plugging. The main
261 problem at present is that gnuplot requires a call to the
262 <code>splot</code> command to plot contours and surfaces, but a
263 call to the <code>plot</code> command to plot simple 2D graphs.
264 Unfortunately, the call to plot the relevant graph is handled by
265 the <code>render()</code> method within the <code>Scene</code>
266 object, and consequently is just the <code>plot</code> command,
267 which means that this is the wrong place for the object-specific
268 rendering commands, and that the <code>Scene.render()</code>
269 method should call the <code>render()</code> methods of the
270 objects within the scene to do all of the rendering hard work.
271 This may take a while to implement, but things will be more
272 flexible in the future as a result.
273 </p>
274 <p>
275 One of the other major problems that will need to be seen to is
276 the sharing of data objects with the module actually doing the
277 rendering and the pyvisi code actually being run by the user.
278 There are many elements to work on here. Essentially, we need to
279 put the <code>Renderer</code> object into a separate <a
280 href="http://www.python.org">python</a> process or thread, and
281 then open a pipe to the process and pass commands and objects
282 through to it. This will sort of solve two problems
283 simultaneously as we need a separate thread/process for the
284 <code>Renderer</code> object anyway, and this may be the best way
285 to share data objects around. At present, I have implemented a
286 really dodgy way of passing the data around which isn't scalable,
287 but it managed to get the simple 2D plotting to go. Again, this
288 may take a while...
289 </p>
290 </div>
291 </div>
292
293 <div class="item">
294 <div class="itemTitle">Simple 2D plotting works!</div>
295 <div class="itemDate">18-Jan-2005</div>
296 <div class="itemAuthor">Paul Cochrane</div>
297
298 <div class="itemText">
299 <p>
300 Simple 2D plotting works in both <a
301 href="http://www.vtk.org/">vtk</a>
302 *and* <a href="http://www.gnuplot.info/">gnuplot</a>!! This
303 certainly felt like a major achievement, as it wasn't easy to get
304 vtk to do 2D x-y plots. To get a feeling for what I've done check
305 out <code>plotExample.py</code> in the <code>examples</code>
306 directory of the <a href="http://pyvisi.sourceforge.net">pyvisi</a>
307 distribution.
308 </p>
309 <p>
310 Please note that this is <strong>very</strong> basic. At present
311 one can only plot one set of data, and the way the data is
312 transferred to the renderer module in the backend is very
313 simplistic and not amenable to scaling to large datasets.
314 Nevertheless, this example shows how pyvisi can be used in the
315 future. It is also only possible to pass to the plotting routines
316 two 1D arrays of data, one for the x-axis and one for the y-axis.
317 Also, there isn't any implementation yet for changing colour on
318 the axes, or the plot lines, however there is limited functionality
319 available for choosing different kinds of linestyles. I'm also
320 not completely happy with the syntax at the user-level of the
321 interface, and this has to change. Specifically, the
322 <code>.add()</code> method of the scene object to add an object
323 to the scene. Surely this should be sorted out when one
324 instantiates the object and passes the scene object as an
325 argument. The other method that needs to disappear from user-space
326 is the <code>.render()</code> method of the individual objects.
327 Users should only have to render the scene. The problem here is
328 to finish off some stuff that vtk needs before doing the final
329 render (such as the <code>AddActor()</code> methods); this can be
330 done a better way. One problem with the way I'm doing it at
331 present is that re-rendering *doesn't* need the pre-render step.
332 But re-rendering is a different kettle of fish, and there are
333 many other things to work on before we get to there.
334 </p>
335 <p>
336 Note that to use the vtk renderer module, you must have vtk
337 installed, and have configured vtk for python (so that the python
338 vtk wrappers are available). To use the gnuplot renderer module,
339 you must have gnuplot (version greater than or equal to 3.7)
340 installed, and <a
341 href="http://gnuplot-py.sourceforge.net/">Gnuplot.py</a> (the
342 gnuplot python wrapper).
343 </p>
344 <p>
345 Even with all of these caveats, have a look at the example code,
346 and tell me if you like the syntax (or not), if you have any
347 comments or suggestions as to what I could do extra or what I
348 could do differently, or even if you were able to get the
349 <code>plotExample.py</code> example to go!
350 </p>
351 </div>
352 </div>

  ViewVC Help
Powered by ViewVC 1.1.26