alumi008.mws

Construct the torus using the command " tubeplot "

> with(plots):

> tubeplot([cos(t),sin(t),0],t=0..2*Pi,radius=0.5,scaling=constrained,grid=[30,30],lightmodel=light2);

[Maple Plot]

Construct two tori

> a:=tubeplot([cos(t),sin(t),0],t=0..2*Pi,radius=0.3,scaling=constrained,grid=[30,30],lightmodel=light2):

> b:=tubeplot([0,1+cos(t),sin(t)],t=0..2*Pi,radius=0.3,scaling=constrained,grid=[30,30],lightmodel=light2):

> display(a,b);

[Maple Plot]

Construct the torus using thecommand "plot3d"

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> r:=5+cos(t):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=sin(t):

> plot3d([x,y,z],s=0..2*Pi,t=0..2*Pi,scaling=constrained,grid=[30,30],lightmodel=light2);

[Maple Plot]

Construct the torus by pasting two patches

> restart;

> with(plots):

Warning, the name changecoords has been redefined

> k:=5:

> r:=3+cos(t):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=sin(t):

> s:=u+v/3:

> t:=k*u:

> a:=plot3d([x,y,z],u=0..2*Pi,v=0..2*Pi/k,scaling=constrained,color=yellow,grid=[100,20]):

> b:=plot3d([x,y,z],u=0..2*Pi,v=2*Pi/k..4*Pi/k,scaling=constrained,color=blue,grid=[100,20]):

> c:=plot3d([x,y,z],u=0..2*Pi,v=4*Pi/k..6*Pi/k,scaling=constrained,color=red,grid=[100,20]):

> display(a,b,c);

[Maple Plot]

Construct one half of a torus so its cross-section consists of two disjoint circles.

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> r:=2.5+cos(t):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=sin(t):

> plot3d([x,y,z],s=0..Pi,t=0..2*Pi,scaling=constrained,grid=[30,30],lightmodel=light2);

[Maple Plot]

Construct one half of a torus so its cross-section consists of two concentric circles.

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> r:=2.5+cos(t):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=sin(t):

> plot3d([x,y,z],s=0..2*Pi,t=0..Pi,scaling=constrained,grid=[30,30],lightmodel=light2);

[Maple Plot]

Construct one half of a torus so its cross-section consists of two intersecting circles.

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> a:=3:b:=4:c:=sqrt(a^2+b^2):

> r:=c+a*cos(t):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=a*sin(t):

> u:=solve(b*z=a*x,s):

> plot3d([x,y,z],s=-u..u,t=0..2*Pi,scaling=constrained,grid=[50,100],lightmodel=light2);

[Maple Plot]

Construct one half of a torus so its cross-section consists of two interlocking circles in space.

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> a:=3:b:=4:c:=sqrt(a^2+b^2):

> x0:=c*cos(t):

> y0:=a+c*sin(t):

> z0:=0:

> s:=arccos(b/c):

> x1:=x0*cos(s)-z0*sin(s):

>

> y1:=y0:

> z1:=x0*sin(s)+z0*cos(s):

> x:=x1*cos(u)-y1*sin(u):

> y:=x1*sin(u)+y1*cos(u):

> z:=z1:

> plot3d([x,y,z],t=0..2*Pi,u=0..Pi,scaling=constrained,grid=[50,50],lightmodel=light2);

[Maple Plot]

Construct a knot as thus:

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> r:=5+cos(2.5*s):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=sin(2.5*s):

> tubeplot([x,y,z],s=0..6*Pi,radius=0.7,scaling=constrained,grid=[100,30],lightmodel=light2);

[Maple Plot]

Construct knots as thus:

> restart:

> with(plots):

Warning, the name changecoords has been redefined

> r:=3+cos(0.4*s):

> x:=r*cos(s):

> y:=r*sin(s):

> z:=sin(0.4*s):

> tubeplot([x,y,z],s=0..10*Pi,radius=0.3,scaling=constrained,grid=[100,10],lightmodel=light2);

[Maple Plot]

Construct a twisted torus whose sections are formed by regular triangles:

> restart;

> p:=2*Pi/4:

> r1:=3+cos(t/4):

> x1:=r1*cos(t):

> y1:=r1*sin(t):

> z1:=sin(t/4):

> r2:=3+cos(t/4+p):

> x2:=r2*cos(t):

> y2:=r2*sin(t):

> z2:=sin(t/4+p):

> x:=(1-s)*x1+s*x2:

> y:=(1-s)*y1+s*y2:

> z:=(1-s)*z1+s*z2:

> plot3d([x,y,z],s=0..1,t=0..8*Pi,scaling=constrained,grid=[10,100]);

[Maple Plot]

>