摘要
Data file
This graphic was created in MATLAB using the following code:
%create u-v grid space
u=linspace(0,2*pi,120);
v=linspace(0,2*pi,120);
[u,v]=meshgrid(u,v);
R=0.5; %set large radius of torus
r=abs(cos(v/2))*0.2+0.05; %set small radius to vary with angle
%parametrization
x=(R+r.*cos(u)).*cos(v);
y=(R+r.*cos(u)).*sin(v);
z=r.*sin(u);
H=surf(x,y,z);
hold on; %put a hold on this figure
set(H,'FaceColor',[0.25 0.25 0.75],'EdgeColor','none');
set(H,'SpecularColorReflectance', 0.2, 'DiffuseStrength', 0.8);
set(H,'AmbientStrength', 0.3,'FaceLighting','phong');
set(H,'SpecularExponent', 100);
daspect([1 1 1]); %set ratio of x,y,z axes
axis tight; %fit axes to figure
axis off; %don't show axes
view(190, 40); %set viewing angle
camlight (-50, 54); lighting phong; %add light source
%add another torus to show tightest place on the torus
R2=0.075;
r2=0.025;
x2=(R2+r2.*cos(u)).*cos(v)-0.5;
y2=r2.*sin(u);
z2=(R2+r2.*cos(u)).*sin(v);
H2=surf(x2,y2,z2);
set(H2,'FaceColor',[0.75 0.25 0.25],'EdgeColor','none');
set(H2,'SpecularColorReflectance', 0.2, 'DiffuseStrength', 0.8);
set(H2,'AmbientStrength', 0.5,'FaceLighting','phong');
set(H2,'SpecularExponent', 100);
许可协议
| Public domainPublic domainfalsefalse
|
|
我,本作品著作权人,释出本作品至公有领域。这适用于全世界。 在一些国家这可能不合法;如果是这样的话,那么: 我无条件地授予任何人以任何目的使用本作品的权利,除非这些条件是法律规定所必需的。
|