What Is Topology?
http://www.livescience.com/51307-topology.htmlI generated the wireframe models using MATLAB. Here's the code I used along with links to all the parametric equations.
[u,v]=meshgrid(linspace(0,2*pi,25));
%cylinder
%http://mathworld.wolfram.com/Cylinder.html
% x=1.1*cos(u);
% y=1.1*sin(u);
% z=v/(2*pi);
%mobius strip
%http://mathworld.wolfram.com/MoebiusStrip.html
% r=5;
% s=(u-pi)/pi*2;
% t=v;
% x=(r+s.*cos(t/2)).*cos(t);
% y=(r+s.*cos(t/2)).*sin(t);
% z=(s.*sin(t/2));
%sphere
%http://mathworld.wolfram.com/Sphere.html
% r=5;
% theta=u;
% phi=v/2;
% x=r*cos(theta).*sin(phi);
% y=r*sin(theta).*sin(phi);
% z=r*cos(phi);
%torus
%http://mathworld.wolfram.com/Torus.html
% a=5;
% c=10;
% x=(c+a*cos(v)).*cos(u);
% y=(c+a*cos(v)).*sin(u);
% z=a*sin(v);
%klein bottle
%http://paulbourke.net/geometry/klein/
% r=4*(1-cos(u)/2);
% x=(u<pi).*(6*cos(u).*(1+sin(u))+r.*cos(u).*cos(v)) + (u>=pi).*(6*cos(u).*(1+sin(u))+r.*cos(v+pi));
% y=(u<pi).*(16*sin(u)+r.*sin(u).*cos(v)) + (u>=pi).*(16*sin(u));
% z=r.*sin(v);
%cross-cap disk
%https://en.wikipedia.org/wiki/Real_projective_plane#Cross-capped_disk
% r=5;
% x=r*(1+cos(v)).*(cos(u));
% y=r*(1+cos(v)).*(sin(u));
% z=-tanh(u-pi)*r.*sin(v);
hold on
mesh(x,y,z);
camlight left;
lighting phong;
alpha(0.4);
axis equal;
hold off
No comments:
Post a Comment