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,0,'data',[0,1,0])
drawnow
end
这段代码是绘制一个动态立方体的,请注释一下这段代码.
尤其让我困惑的是它前面给出那么多点坐标是什么意思,给出八个顶点坐标不就够了么?
两位兄台的回答对小弟都很有帮助,分给谁我很难抉择,只能按先到先得原则给分了.
MATLAB高手请进X=[1,1,1,1] ; X0=[ 1,1,2,2] ;Y=[1,2,2,1] ; Y0=[ 1,2,2,1];Z=[1,1,2,2] ; Z0=[ 2,2,2,2];C=[0.5,1.0,1.0,0.5]; C0=[ 1.0,0.5,0.5,0.1667];X1=[ 2,2,1,1]; Y1=[ 1,1,1,1]; Z1=[ 1,2,2,1]; X2=[1,1,2,2];Y2=[1,2,2,1];Z2=[1,1,1,1];X3=[2,2,2,2];Y3=[
X,Y,Z,确定一个平面 该平面的四个点为
(1,1,1)
(1,1,2)
(1,2,1)
(1,2,2)
X为四个点的x坐标值,Y为四点的y坐标值,Z为四点的Z坐标值,C应为平面填充的颜色向量,
正方体有六个面,所以有六组X,Y,Z
fill3(X,Y,Z,C)