8字形 克莱因瓶 matlab有谁能给出 8字形 克莱因瓶 的 matlab 程序啊,
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/04 21:29:35
![8字形 克莱因瓶 matlab有谁能给出 8字形 克莱因瓶 的 matlab 程序啊,](/uploads/image/z/10137554-26-4.jpg?t=8%E5%AD%97%E5%BD%A2+%E5%85%8B%E8%8E%B1%E5%9B%A0%E7%93%B6+matlab%E6%9C%89%E8%B0%81%E8%83%BD%E7%BB%99%E5%87%BA+8%E5%AD%97%E5%BD%A2+%E5%85%8B%E8%8E%B1%E5%9B%A0%E7%93%B6+%E7%9A%84+matlab+%E7%A8%8B%E5%BA%8F%E5%95%8A%2C)
8字形 克莱因瓶 matlab有谁能给出 8字形 克莱因瓶 的 matlab 程序啊,
8字形 克莱因瓶 matlab
有谁能给出 8字形 克莱因瓶 的 matlab 程序啊,
8字形 克莱因瓶 matlab有谁能给出 8字形 克莱因瓶 的 matlab 程序啊,
n = 12;
a = .2; % the diameter of the small tube
c = .6; % the diameter of the bulb
t1 = pi/4 :pi/n :5*pi/4; % parameter along the tube
t2 = 5*pi/4 :pi/n :9*pi/4; % angle around the tube
u = pi/2 :pi/n :5*pi/2;
[X,Z1] = meshgrid(t1,u);
[Y,Z2] = meshgrid(t2,u);
% The handle
len = sqrt(sin(X).^2 + cos(2*X).^2);
x1 = c*ones(size(X)).*(cos(X).*sin(X) ...
- 0.5*ones(size(X))+a*sin(Z1).*sin(X)./len);
y1 = a*c*cos(Z1).*ones(size(X));
z1 = ones(size(X)).*cos(X) + a*c*sin(Z1).*cos(2*X)./len;
handleHndl=surf(x1,y1,z1,X);
set(handleHndl,'EdgeColor',[.5 .5 .5]);
hold on;
% The bulb
r = sin(Y) .* cos(Y) - (a + 1/2) * ones(size(Y));
x2 = c * sin(Z2) .* r;
y2 = - c * cos(Z2) .* r;
z2 = ones(size(Y)) .* cos(Y);
bulbHndl=surf(x2,y2,z2,Y);
set(bulbHndl,'EdgeColor',[.5 .5 .5])
colormap(hsv);
axis vis3d
view(-37,30);
axis off
light('Position',[2 -4 5])
light
hold off