Why is the WARP command unable to display the expected texture mapped surface on Windows when using MATLAB 7.0 (R14)?

I run the following code on a Windows machine:
[x,y,z] = cylinder;
I = imread('testpat1.png');
warp(x,y,z,I);
This does not yield the expected texture mapped surface.

 Accepted Answer

This limitation is the result of a renderer issue on the Windows platform .The WARP command generates this result when the renderer is set to "Painters".
To work around this issue, set the renderer to ''OpenGL'' or "Zbuffer". The example below shows how to set the renderer to OpenGL:
close all
set(gcf,'Renderer','OpenGL');
[x,y,z] = cylinder;
I = imread('testpat1.png');
warp(x,y,z,I);

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!