No BSD License  

Highlights from
Read VRML 2.0 to Matlab 7

4.0

4.0 | 1 rating Rate this file 34 Downloads (last 30 days) File Size: 25.32 KB File ID: #12106
image thumbnail

Read VRML 2.0 to Matlab 7

by Ricky Zhang

 

31 Aug 2006 (Updated 01 Sep 2006)

Read VRML 2.0 to Matlab 7.

| Watch this File

File Information
Description

In this version, it can only read the geometry in VRML 2.0 file to Matlab 7.

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (7)
02 Sep 2006 Billy Yang

It is great, and fits for my work. Hope for reading more stuffs, e.g. texture, normals...

08 Sep 2008 giulio antonutto

what about a UNIX version?
thanks
G.

22 Sep 2008 Neerja Balachander

Hi there, Could you recompile it so it works for Mac? Thnx

16 Jan 2009 Rob

This would be great, except is there a header file that should be included? How do I load a .dll ?

03 Jul 2009 Amy VanB

"16 Jan 2009 Rob This would be great, except is there a header file that should be included? How do I load a .dll ?"

Rob:
You'll find the following code useful:

%Generate h-file (handle pointing to)the mfile
hReadVRML20 = @ReadVRML20;%('10divlateralAnkleQuick.wrl');

%Save h-file to Current Directory
save hReadVRML20.h hReadVRML20;

%Load dll library
loadlibrary('ReadVRML2_0.dll','hReadVRML20.h');

%Now able to call the ReadVRML20(vrml_fn) m-file
%ex: ReadVRML20('10divlateralAnkleQuick.wrl');

19 Oct 2010 Franklin Mungau

This code works well for MATLAB 7.0 but it is important that the wrl file defines each vertex and polygon on a new line; otherwise some vertices and polygons will be ignored! Confirm this by opening the wrl file in the MATLAB editor. In addition, I found that it may be necessary to modify the h file generation as follows (i.e. excluding the file extensions):

%Generate h-file (handle pointing to) the mfile
hReadVRML20 = @ReadVRML20;

%Save h-file to Current Directory
save hReadVRML20.h hReadVRML20;
loadlibrary('ReadVRML2_0','hReadVRML20');
chk = libisloaded('ReadVRML2_0');

if chk
    disp('The dll loaded successfully')
else
    disp('The dll was not loaded successfully')
end

%Now able to call the ReadVRML20(vrml_fn) m-file
o = ReadVRML20('my_file.wrl');

% plot the 3D world
x = o.Vertex(1,:);
y = o. Vertex (2,:);
z = o. Vertex (3,:);
tri = o.Face';
trimesh(tri,x,y,z,'edgecolor','black');

% Unload the library (after use) and free up the memory
unloadlibrary ReadVRML2_0

   

23 Nov 2010 planetx

Do you have ReadVRML2_0.dll 64bit version ?
I got this error in Matlab 7.11
"Microsoft Visual C++ 2005 or 2008 is required to use this feature.
"
I think that is because of I am using Matlab 64bit version.

Please login to add a comment or rating.
Updates
01 Sep 2006

Small modification.

Tag Activity for this File
Tag Applied By Date/Time
data exploration Ricky Zhang 22 Oct 2008 08:36:19
vrml2 Ricky Zhang 22 Oct 2008 08:36:19
geometry Ricky Zhang 22 Oct 2008 08:36:19
matlab 7 Ricky Zhang 22 Oct 2008 08:36:19
graphical data exploration Ricky Zhang 22 Oct 2008 08:36:19
graphics Ricky Zhang 22 Oct 2008 08:36:19
vrml2 Olivier Ripoll 18 Jan 2011 04:38:57
vrml Marcel 30 Nov 2011 01:06:26
vrml2 Avshalom 12 Jan 2012 05:52:51

Contact us at files@mathworks.com