How to display a 3d array in 3d using texture mapping
8 views (last 30 days)
Show older comments
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 Comments
Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!