Thread Subject: Texture mapping matlab

Subject: Texture mapping matlab

From: somesh kashyap

Date: 10 Oct, 2008 03:13:02

Message: 1 of 1

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

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
3d somi 9 Oct, 2008 23:15:05
texture somi 9 Oct, 2008 23:15:05
interpolation somi 9 Oct, 2008 23:15:05
vrml somi 9 Oct, 2008 23:15:05
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com