I had seen surf.m code and found than surf.m used tri_surf.m. tri_surf used triangle for draw surface.
But if surf.m use quadrilateral for plot surface( ex. if exist quad_surf.m), the number of polygon reduces to half. I think this can reduce the time for plot.
Is there any reason for using triangle for plot surface?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
> Is there any reason for using triangle for plot surface?
No, except that it was easier that way. If you know how to do it please feel free to implement the function with quads, I'll be happy to include it in octaviz.
Cheers,
Dragan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My platform is c# on winXP and vtk 5.0.
So I can not fully implement it with octave.
But each binding of vtk is very similar, I can give some clue to quad_mesh.m
The method is really simple.
----- in surf.m -------------------
octaviz make triangle like
I had seen surf.m code and found than surf.m used tri_surf.m. tri_surf used triangle for draw surface.
But if surf.m use quadrilateral for plot surface( ex. if exist quad_surf.m), the number of polygon reduces to half. I think this can reduce the time for plot.
Is there any reason for using triangle for plot surface?
> Is there any reason for using triangle for plot surface?
No, except that it was easier that way. If you know how to do it please feel free to implement the function with quads, I'll be happy to include it in octaviz.
Cheers,
Dragan
Sorry, actually I do not use octave.
My platform is c# on winXP and vtk 5.0.
So I can not fully implement it with octave.
But each binding of vtk is very similar, I can give some clue to quad_mesh.m
The method is really simple.
----- in surf.m -------------------
octaviz make triangle like
t=[i*n+j,(i+1)*n+j,(i+1)*n+(j+1) ; (i+1)*n+(j+1),i*n+(j+1),i*n+j];
upper triangles; lower triangles
you can make quad like this
quad = [i*n+j,(i+1)*n+j,(i+1)*n+(j+1), i*n+j+1];
------ in quad_surf.m -------------
finally, change number 3 to 4 at the dimention check routines etc..
and
no_quad = size(quad,1);
t = [ones(no_quad,1)*4 t-1]';
this can make quad surf easily.
I tested it with c# binding of vtk, and I used vtk 5.0