中国国旗的难点就在于转星星。。。本人于是用了下极坐标转换函数。。。话不多说,上程序!function Chineseflag()flag = zeros(13,40);show = flag;show(end+1,1) = 0;show(end,end+1) = 1;pcolor(1:41,1:14,show);colormap hsvshading flataxis offhold onChinesestar(1.5,6,11,0)Chinesestar(0.5,12,8,pi/5)Chinesestar(0.5,15,9.5,pi/30)Chinesestar(0.5,15,11.5,pi/8)Chinesestar(0.5,12,13,-pi/15)hold off上面是主程序接下来是画星星。。。function Chinesestar(r,x,y,z)A = r*[-cos(pi*1/10),-sin(pi*1/10)*tan(pi*2/10),0,sin(pi*1/10)*tan(pi*2/10),cos(pi*1/10),sin(pi*1/10)/cos(pi*2/10)*cos(pi*1/10),cos(pi*3/10),0,-cos(pi*3/10),-sin(pi*1/10)/cos(pi*2/10)*cos(pi*1/10),-cos(pi*1/10)];B =
...
继续阅读
(45)