A=[100, 300;120, 200;220, 200;270, 100;370, 100;420,200; 420,300;220, 280;100, 300];
B=[10,-10;30,-30;30,-30;30,-10;20, 20;20,20;-20,20;-20, 10;20,-20];
Q=[2,-2,1,1;-3,3,-2,-1;0,0,1,0;1,0,0,0] ;
plot(A(:,1) ,A(:,2)) ;
[m,n]=size (A) ;
hold on
for i=1 :m-1
for t=0:0.001:1
T=[t^3,t^2,t,1];
Px=[A(i,1),A(i+1,1),B(i,1),B(i+1,1)];
Py=[A(i,2),A(i+1,2),B(i,2),B(i+1,2)];
x=T*Q*Px' ;
y=T*Q*Py';
plot(x,y, 'b');
end
end
這個程式運行結果影像僅有切點,別的圖形無法顯示,怎么辦
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/48310.html
標籤:設計模式
上一篇:求這個matlab的代碼
下一篇:虹膜資料庫
