实在是很无聊的东西,哪位IT男票想拿去哄妹子的就COPY过去好了!
Matlab代码:
close all;
alpha = -pi : pi/50 : pi;
x = 2*cos(alpha);
y = 2*sin(alpha);
for p=1:length(x)
alpha1 = -pi : pi/100 : pi;
x1 = 1*cos(alpha1);
y1 = 1*sin(alpha1);
hold on;
plot(x(1,p)+x1,y(1,p)+y1-1,'g');
end
axis off;
hold on;
theta = -pi: pi/50 :pi;
rho = 2*(1-sin(theta));
polar(theta,rho,'* r');%画红色心形线
axis off;