From: Saurabh Mahapatra on
Hi there,

I am not sure what you mean by reading in a VRML file. The VRML file is a text-based file with a very well defined format making it amenable to parsing.

1. If you want to view the VRML file from a MATLAB file and animate it, then see the example here:

http://www.mathworks.com/matlabcentral/fileexchange/26273-animate-a-wind-farm-with-matlab

2. If you want to access the coordinates of the VRML file, then you will have to write a parser yourself that will extract the coordinates. It will depend on what it is that you are trying to do with the coordinates. For example, it would be the reverse of what I try to do here (mesh2vrml):

http://www.mathworks.com/matlabcentral/newsreader/view_thread/284930

Functions that come to my mind for doing this: file operation functions-fopen etc, and REGEXP.

Thanks,

Saurabh
From: Jan Houska on
Hi,

Saurabh Mahapatra wrote:

> 2. If you want to access the coordinates of the VRML file, then you will
> have to write a parser yourself that will extract the coordinates. It
> will depend on what it is that you are trying to do with the
> coordinates.

Anothe way would be to open the VRML file by Simulink 3D Animation and
then retrieve the coordinates and other field values by the
object-oriented access to virtual world ("getfield" and such) provided
by the product.

Jan


--
Jan Houska HUMUSOFT s.r.o.
houska(a)humusoft.com Pobrezni 20
http://www.humusoft.com 186 00 Praha 8
tel: ++ 420 284 011 730 Czech Republic
fax: ++ 420 284 011 740