How to display a 3d array in 3d using texture mapping
조회 수: 7 (최근 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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!