How to display a 3d array in 3d using texture mapping

8 次查看(过去 30 天)
Sir,
I am able to display 2D array as a Solid rectangle. But How to display 3d array as solid CUBE in 3d, I got vol3d.m file from the net but I am not aware of input parameter 'varargin' , whether 'a' can be input.
k=50; a = zeros(k,k,k) % Preallocate matrix for m = 1:k for n = 1:k for r = 1:k if( ( abs(m-24)+abs(n-24)+ abs(r-24)) < 24) a(m,n) = 255; end
end
end
How to display a as cube using texture mapping ?
like 2d function f1() k=50; a = zeros(k,k) % Preallocate matrix for m = 1:k for n = 1:k if( ( abs(m-24)+abs(n-24)) < 24) a(m,n) = 255; end
end
end
imshow(a);
return
end
Regards, Dileep S

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by