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 -- |
From: LUK S. <shu...@po...> - 2005-11-13 09:11:19
|
LUK ShunTim wrote: > 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). Sorry! The diagonal should be between (1,0) and (0,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 > -- |
From: Dragan T. <dra...@ul...> - 2005-11-14 13:07:29
|
Apparently, there is a bug in vtk_trisurf that prevents you from rendering surfaces that contain two triangles only. Try with four triangles (don't mind overlaping triangles): tri=[1 2 3; 2 3 4; 1 2 3; 2 3 4;] Cheers, Dragan Selon LUK ShunTim <shu...@po...>, 13.11.2005: > LUK ShunTim wrote: > > 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). > > Sorry! The diagonal should be between (1,0) and (0,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 > > -- > > > ------------------------------------------------------- > SF.Net email is sponsored by: > Tame your development challenges with Apache's Geronimo App Server. Download > it for free - -and be entered to win a 42" plasma tv or your very own > Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php > _______________________________________________ > Octaviz-help mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octaviz-help > > |