[vtkusers] matlab surf ability?
    Roman Putanowicz 
    putanowr at l5.pk.edu.pl
       
    Mon Jan  5 00:13:01 EST 2009
    
    
  
Hi,
> In matlab I can send three matrics  (X,Y,Z) to surf and get a surface.
> (...) I am trying to rewrite my Matlab program so that it can be compiled and
> shared with some teacher friends who could use it to help illustrate what
> they are teaching.  
> (...)
> I am just not sure how to do that with vtk.
The most straightforward thing to do in you case is to use package Octaviz.
http://octaviz.sourceforge.net
Octaviz is Octave wrapper for VTK. Octave in turn is very, very similar
to Matlab. http://www.gnu.org/software/octave
Octaviz provides wrappers for VTK classes but the same time
it provides a bunch of high level functions, among them vtk_surf which
does the same as the Matlab surf function.
By using Octaviz you solve both problems: you get the surface and share code.
Porting to Octave shouldn't be difficult (unless you use a specialised
toolbox) and the same time understanding octave code for someone knowing
Matlab is trivial. 
I am using Octaviz on Linux. You can get Octave version for Windows though
I do not know about Octaviz.
If Octaviz is not sufficient you could (but this means making hands 
dirty :) write the respective code in C++ and then make Octave wrapper
either using Octave build-in compiler mkoctfile or using SWIG 
http://www.swig.org.
I hope this helps,
Best regards
Roman
-- 
Roman Putanowicz  < putanowr at l5.pk.edu.pl  >
Institute for Computational Civil Engng (L-5)
Dept. of Civil Engng, Cracow Univ. of Technology
www.l5.pk.edu.pl, tel. +48 12 628 2569, fax 2034
    
    
More information about the vtkusers
mailing list