loxics <loxics@gmail.com> wrote in message
> Do you have any suggest on how I may texture map onto this triangular 3D model and maintain quality of the texture image?
What you were doing isn't exactly "texture mapping", since patch objects don't support that. I'm guessing you were setting the CData property of the patch object. You should check the MATLAB documentation regarding this patch property. It indicates how you can add one color per triangular face (i.e. each face has a flat color, I believe) or one color per vertex, which I think is what you were doing which gave you the image you had linked to. This isn't exactly like texture mapping, where you can map multiple colored pixels to a face, but it's the best you can do with patches as far as I know.
Hope this helps,
Ken
loxics - 06 Oct 2008 14:34 GMT
I see, thanks for the information.
Besides patch then, is there any other feature in MATLAB that is remotely close to Texture Mapping?
Kenneth Eaton - 07 Oct 2008 17:42 GMT
> I see, thanks for the information.
>
> Besides patch then, is there any other feature in MATLAB that is remotely close to Texture Mapping?
Only surface objects support texture mapping, but plotting surfaces generally requires regular grids. Since you have an irregular triangular grid, this makes things difficult. The question becomes how attached are you to showing the triangular grid in the image, or are you willing to transform it to a regular grid for the sake of displaying a texture-mapped image?
If you really want a texture-mapped surface, I would check out the following MATLAB documentation:
http://www.mathworks.com/access/helpdesk/help/techdoc/visualize/f0-45715.html
(The address might be wrapped funny) If you scroll down to where it says "Surface Plots of Nonuniformly Sampled Data", you can see how you may be able to generate a regular surface from your triangular one. Using this regular grid, you should be able to create a surface that you can texture map to.
Hope this helps,
Ken
loxics - 08 Oct 2008 16:07 GMT
Thank you very much for all your help, i will have this a look.