A few days ago a question was posted on this list regarding contourc
compatible functions available under GPL
(http://www.octave.org/octave-lists/archive/help-octave.2004/msg01124.html).
I mentioned I was working on deriving such a function from the PLPlot
contour routine. The code is ready now. I defined a function
cl_cont(x,y,Z,levels,nlevels);
which takes vectors x,y and an array Z, representing a function f(x,y) over
a grid, so that
Z(i,j) = f(x(j),y(i)).
It returns a 2 column matrix, following the format of Matlab's contourc.
I coded this in C++ rather than the original C of PLPlot. Just to harmonize
with my own use, I used Blitz++ Array's to hold the data and decided to
output a transposed version of contourc instead of contourc itself.
Currently, instead of calling Octave's contour.m, I'm calling my
contour_vm.m, which in turns calls the C++ executable containing the
cl_cont() function, and then takes the output and plots the contours with
line(). Very pedestrian, but it's enough for me now. However, I wanted to
know if there is any interest in having something like this better
integrated with Octave (my personal preference). I don't know enough about
Octave internals to do it myself, but if it looks like a good approach, then
probably with help from others it could be done.
Regards,
Victor
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------