From: LUK S. <shu...@po...> - 2005-11-13 08:59:27
|
Hello, I do not quite understand the use of the vtk_trisurf. I tried this simple 2 triangle example - the unit square with a diagonal connecting (0,0) and (1,1). The coordinates (x, y) and function values f are (columns vectors): x=[0. 1. 0. 1.]' y=[0. 0. 1. 1.]' f=[1. 2. 3. 4.]' and the triangulation is tri=[1 2 3; 2 3 4] Now using vtk_trisurf(tri, x, y, f) doesn't work. I got the error message "error: number of rows must match (2 != 3) near line 149, column 27 error: evaluating postfix operator `'' near line 149, column 28 error: evaluating assignment expression near line 149, column 5 error: called from `vtk_trisurf' in file `/usr/share/octave/site/m/octaviz/vtk_trisurf.m'" I think I'm using the "4-parameter" method outlined in the online manual "trisurf can be called with 2(3) or 4(5) parameters as trisurf(t,[x1 y1 z1; ...; xn, yn, zn],(c)) or trisurf(t,[x1; ...; xn],[y1; ...; yn], [z1; ...; zn],(c))" (It appears this is also the M**lab way to invoke trisurf according to their online documentation.) I'd be grateful if someone can provide a working snippet with this simple example. IMHO, it'd be great if it's added to the online documentation. Regards, ST -- |