how to find an image using imshow from 3D plot as i have generated?

19 ビュー (過去 30 日間)
ajeet verma
ajeet verma 2017 年 7 月 17 日
i have generated a 3D plot and i need an image in 3d form how to find? code is here % cube plot clc; clear all; % 1st plane p1=[0,0,0]; p2=[2,0,0]; p3=[2,4,0]; p4=[0,4,0]; x=[p1(1) p2(1) p3(1) p4(1)]; y=[p1(2) p2(2) p3(2) p4(2)]; z=[p1(3) p2(3) p3(3) p4(3)]; fill3(x,y,z,3) xlabel('x'); ylabel('y'); zlabel('z'); %axis([-1 3 -1 5 -1 4]) %grid hold on
%2nd plane p5 = [0 0 3]; p6 = [2 0 3]; p7 = [2 4 3]; p8 = [0 4 3];
x = [p5(1) p6(1) p7(1) p8(1)]; y = [p5(2) p6(2) p7(2) p8(2)]; z = [p5(3) p6(3) p7(3) p8(3)]; fill3(x, y, z, 1);
%3rd plane p2 = [2 0 0]; p3 = [2 4 0]; p6 = [2 0 3]; p7 = [2 4 3];
x = [p2(1) p3(1) p7(1) p6(1)]; y = [p2(2) p3(2) p7(2) p6(2)]; z = [p2(3) p3(3) p7(3) p6(3)]; fill3(x, y, z, 2);
%4th plane p1 = [0 0 0]; p4 = [0 4 0]; p8 = [0 4 3]; p5 = [0 0 3];
x = [p1(1) p4(1) p8(1) p5(1)]; y = [p1(2) p4(2) p8(2) p5(2)]; z = [p1(3) p4(3) p8(3) p5(3)]; fill3(x, y, z, 3);
%5th plane p4 = [0 4 0]; p3 = [2 4 0]; p7 = [2 4 3]; p8 = [0 4 3];
x = [p4(1) p3(1) p7(1) p8(1)]; y = [p4(2) p3(2) p7(2) p8(2)]; z = [p4(3) p3(3) p7(3) p8(3)]; fill3(x, y, z, 1);
%6th plane p1 = [0 0 0]; p2 = [2 0 0]; p6 = [2 0 3]; p5 = [0 0 3];
x = [p1(1) p2(1) p6(1) p5(1)]; y = [p1(2) p2(2) p6(2) p5(2)]; z = [p1(3) p2(3) p6(3) p5(3)]; fill3(x, y, z, 2); hold off

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by