Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Texture mapping matlab
Date: Fri, 10 Oct 2008 03:13:02 +0000 (UTC)
Organization: Penn State
Lines: 23
Message-ID: <gcmh7u$e6l$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223608382 14549 172.30.248.38 (10 Oct 2008 03:13:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 10 Oct 2008 03:13:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1452717
Xref: news.mathworks.com comp.soft-sys.matlab:494492


Greetings,
I have 2 queries, first related to texture mapping and the second related to interpolation. Any help is appreciated :).
Thanks in advance

1. I am trying to display a VRML file in matlab.
I read the Vertices=V, Faces=F, 
Texture co-ordinates RGB values=K
and use the following command to display :
X=V(:,1);Y=V(:,2);Z=V(:,3);
trisurf(F,X,Y,Z,'FaceVertexCData',K,'EdgeColor','interp','facecolor','interp');


However in a new VRML file along with vertex,faces,texture co-ordinates , TEXTURE CO-ORDINATE INDEX is also given.
I need help in mapping texture co-ordinate index to geometry co-ordinate...i.e. what is the texture at a particular vertex (or face)...and I am totally clueless :)


2. I have a surface whose vertices are irregularly sampled. I sample it on a regular grid using griddata.
However my surface spans more than 180 degrees so I have 2 different values of Z for a X,Y. griddata however takes the mean of they two Z values. Is there any way to interpolate Z values of my surface in matlab ? should I convert to cylindrical co-ordinates ?


Thanks for you time, any help is appreciated.
Regards,
Somi