database

옥타브 코드

작성자
김준석
작성일
2023-07-21 16:46
조회
172

clear; clf;

alpha = 0.2;

x=[0 5 5 0];

y=[0 0 5 5];

z=[0 0 0 0];

fill3(x,y,z,'g','FaceAlpha',alpha); hold on

x=[0 0 0 0];

y=[0 5 5 0];

z=[0 0 5 5];

fill3(x,y,z,'y','FaceAlpha',alpha);

x=[1 4 4 1];

y=[1 1 4 4];

z=[0 0 0 0];

fill3(x,y,z,'k','FaceAlpha',1); hold on

a=-3;

b=2.5;

c=5;

plot3(a,b,c,'ro','linewidth',5)

for i=1:4

plot3([a x(i)],[b y(i)],[c z(i)],'linewidth',5)

end

c=2.85;

plot3([0 0],[0 5],[c c],'k','linewidth',2)

c=1.2;

plot3([0 0],[0 5],[c c],'k','linewidth',2)

b=1.4;

plot3([0 0],[b b],[0 5],'k','linewidth',2)

b=1.85;

plot3([0 0],[b b],[0 5],'k','linewidth',2)

b=3.15;

plot3([0 0],[b b],[0 5],'k','linewidth',2)

b=3.6;

plot3([0 0],[b b],[0 5],'k','linewidth',2)

grid on

axis image

전체 0