To export 3D MATLAB graphics to the .WML file format, you can consider using the VRML function that is built-into MATLAB. The code snippet below illustrates exporting a 3D planar surface to this format. To reproduce this, execute the following:
xran=rand(10,3);
figure, plot3(xran(:,1),xran(:,2),xran(:,3)), grid on
vrml(gcf,'output.wrl')
You can replicate this example with a 3D surface by replacing the second step in the previous example with the example command 'membrane' and follow through with the same third step for exporting the image.
Exporting 3D graphics from MATLAB to the .OBJ file format is not directly supported. However, there are third-party users who have created functions that can do the same, an example of which is the SAVEOBJMESH function which is outlined here:
Note
:
The 'vrml' function was removed in R2014a. To use the function now, you must download it from FileExchange here:
Note that MathWorks does not guarantee or warrant the use or content of these third-party submissions. Any questions, issues, or complaints should be directed to the contributing author.
Best Answer