From: Ben Jeurissen on 19 Apr 2010 11:52 Did you figure this out yet? Exporting the patch h without color information is no problem: verts = get(h,'Vertices'); v = sprintf('vertex_vectors {\n%i,\n', size(verts,1)); v = [v sprintf('<%f, %f, %f>,\n', verts')]; v = v(1:end-2); v = [v sprintf('\n}\n')]; norms = get(h,'VertexNormals'); n = sprintf('normal_vectors {\n%i,\n', size(norms,1)); n = [n sprintf('<%f, %f, %f>,\n', norms')]; n = n(1:end-2); n = [n sprintf('\n}\n')]; faces = get(h,'Faces'); f = sprintf('face_indices {\n%i,\n', size(faces,1)); f = [f sprintf('<%i, %i, %i>,\n', faces'-1)]; f = f(1:end-2); f = [f sprintf('\n}\n')]; povray = [sprintf('mesh2 {\n') v n f sprintf('}\n')]; However, I haven't found a good way to export the colors of the vertices. Povray supports color per vertex in the mesh2 object. However, it seems to support only indexed color... hall <XandreashX(a)fy.chalmers.se> wrote in message <dtf42a$lab$1(a)eol.dd.chalmers.se>... > Hi. > > I am currently using the matlab visualise isosurfaces of a data set that > I have. To get better figures than what matlab can produce, i would like > to render my isosurface in the Pov-Ray raytracer. Does anyone know of > some way to export this patch data into a format readable by Pov-Ray? > Preferebly some method that also transferes the facevertexcdata to the > Pov file. > > I've browsed the file exchange without results and im not to interested > in writing it myself if it has already been done. > > best regards > /hall > > > -- > Det är bara töntar som har en .sig > > ( - Remove capital X from email to reply - )
|
Pages: 1 Prev: Region of interest of image Next: How does the SQP algorithm deal with nonlinear functions? |