12.mws

Construct a surface

> restart;

> x:=(1-s)*cos(t):y:=s*sin(t):

> z:=2*s:

> with(plots):

Warning, the name changecoords has been redefined

> c:=plot3d([x,y,z],s=0..1,t=0..2*Pi,scaling=constrained,color=blue):

> with(plottools):

> vrml(c,"d:/009/12-1.wrl",background_color=white):

> c;

[Maple Plot]

Construct a solid

> restart;

> x1:=cos(t):y1:=sin(t):z1:=0:

> x2:=0:y2:=y1:z2:=sqrt(3)*x1:

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

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

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

> with(plots):with(plottools):

Warning, the name changecoords has been redefined

> a:=plot3d([x,y,z],s=0..1,t=-Pi/2..Pi/2,scaling=constrained,color=green):

> b:=reflect(a,[[0,0,0],[0,1,0],[0,0,1]]):

> x:=r*cos(t):y:=r*sin(t):

> c:=plot3d([x,y,0],r=0..1,t=0..2*Pi,scaling=constrained,color=yellow):

> e:=display(a,b,c):

> vrml(e,"d:/009/12-2.wrl",background_color=white):

> e;

[Maple Plot]

Construct the Klein bottle with parametric equations
x = (a+cos(u/2) sin(v) - sin(u/2) sin(2v)) cos(u)
y = (a+cos(u/2) sin(v) - sin(u/2) sin(2v)) sin(u)
z = sin(u/2) sin(v) + cos(u/2) sin(2v)

> restart;

> r:=2+cos(u/2)*sin(v)-sin(u/2)*sin(2*v):

> x:=r*cos(u):y:=r*sin(u):

> z:=sin(u/2)*sin(v)+cos(u/2)*sin(2*v):

> c:=plot3d([x,y,z],v=0..2*Pi,u=-Pi/4..3*Pi/2,scaling=constrained,grid=[20,50]):

> with(plottools):with(plots):

Warning, the name changecoords has been redefined

> vrml(c,"d:/009/12-3.wrl",background_color=white):

> c;

[Maple Plot]

Construct the hyperboloid of two sheets given by the equation
x2 - y2 - z2 = 1.

> restart;

> with(plots):with(plottools):

Warning, the name changecoords has been redefined

> x1:=tan(t):y:=sec(t):z1:=0:

> x:=cos(s)*x1:z:=sin(s)*x1:

> a:=plot3d([x,y,z],s=0..2*Pi,t=0..Pi/2-0.5,scaling=constrained,color=red):

> b:=plot3d([x,-y,z],s=0..2*Pi,t=0..Pi/2-0.5,scaling=constrained,color=green):

> c:=display(a,b):

> vrml(c,"d:/009/12-4.wrl",background_color=white):

> c;

[Maple Plot]

Construct the smallest sphere that contains the six circles each of which is inscribed in a face of a
cube

> restart;

> with(plots):with(plottools):

Warning, the name changecoords has been redefined

> x1:=1:y1:=cos(t):z1:=sin(t):

> z:=z1:x:=cos(s)*x1-sin(s)*y1:y:=sin(s)*x1+cos(s)*y1:

> u:=arctan(cos(t)):

> a:=plot3d([x,y,z],s=0..Pi/2-2*u,t=-Pi/2..Pi/2,scaling=constrained,color=blue):

> b:=rotate(a,0,0,Pi/2):

> c:=display(a,b):

> d:=rotate(c,0,0,Pi):

> e:=display(c,d):

> vrml(e,"d:/009/12-5.wrl",background_color=white):

> e;

[Maple Plot]

Construct three tori of the same size each enclosing the other two.

> restart;

> with(plots):with(plottools):

Warning, the name changecoords has been redefined

> a:=tubeplot([4*cos(t),4*sin(t),0],t=0..2*Pi,scaling=constrained,radius=0.6,grid=[30,30],color=red):

> b:=tubeplot([4+4*cos(t),0,4*sin(t)],t=0..2*Pi,scaling=constrained,radius=0.6,grid=[30,30],color=green):

> c:=tubeplot([2,2+4*cos(t),2+4*sin(t)],t=0..2*Pi,scaling=constrained,radius=0.6,grid=[30,30],color=yellow):

> e:=display(a,b,c):

> vrml(e,"d:/009/12-7.wrl",background_color=white):

> e;

[Maple Plot]

Show that a certain section of a cube consists of a hexagon.

> restart;

> with(plots):with(plottools):

Warning, the name changecoords has been redefined

> a:=polygon([[1,1,1],[-1,1,1],[-1,0,1],[0,-1,1],[1,-1,1]]):

> a1:=display(a,scaling=constrained):

> a2:=rotate(a1,2*Pi/3,[[1,1,1],[0,0,0]]):

> a3:=rotate(a1,4*Pi/3,[[1,1,1],[0,0,0]]):

> b1:=polygon([[1,1,-1],[1,0,-1],[0,1,-1]]):

> b2:=rotate(b1,2*Pi/3,[[1,1,1],[0,0,0]]):

> b3:=rotate(b1,4*Pi/3,[[1,1,1],[0,0,0]]):

> half:=display(a1,a2,a3,b1,b2,b3):

> vrml(half,"d:/009/12-8.1.wrl",background_color=white):

> half;

 

> half2:=reflect(half,[0,0,0]):

> hexagon:=polygon([[1,-1,0],[0,-1,1],[-1,0,1],[-1,1,0],[0,1,-1],[1,0,-1]],color=pink,thickness=3):

> ch1:=display(half,hexagon):

> with(plottools):

> vrml(ch1,"d:/009/12-8.2.wrl",background_color=white):

> ch1;

[Maple Plot]

> ch2:=display(half,half2,hexagon):

> with(plottools):

> vrml(ch1,"d:/009/12-8.3.wrl",background_color=white):

> ch2;

 

Construct the surface given by the equation

> restart;

> z:=rho*cos(phi):r:=rho*sin(phi):

> x:=r*cos(theta):y:=r*sin(theta):

> rho:=2*cos(phi)*sin(phi)^2:

> c:=plot3d([x,y,z],theta=0..2*Pi,phi=0..Pi/2,scaling=constrained,grid=[20,50],color=green):

> with(plottools):

> vrml(c,"d:/009/12-9.1.wrl",background_color=white):

> c;

 

> e:=plot3d([x,y,z],theta=0..Pi,phi=0..Pi/2,scaling=constrained,grid=[20,50],color=green):

> with(plottools):

> vrml(e,"d:/009/12-9.2.wrl",background_color=white):

> e;

[Maple Plot]

Construct the surface given by the equation

over the square [-2, 2] x [-2,2].

> restart;

> c:=plot3d(4-sqrt(abs(x*y)),x=-2..2,y=-2..2,scaling=constrained):

> with(plottools):

> vrml(c,"d:/009/12-10.1.wrl",background_color=white):

> c;

[Maple Plot]

> x:=r*cos(t):y:=r*sin(t):z:=4-sqrt(abs(x*y)):

> e:=plot3d([x,y,z],r=0..2,t=0..2*Pi,scaling=constrained,grid=[20,101]):

> with(plottools):

> vrml(e,"d:/009/12-10.2.wrl",background_color=white):

> e;

 

Construct the graph of the function

as (x,y) ranges over the unit disc.

> restart;

> x:=r*cos(t):y:=r*sin(t):

> e:=plot3d([x,y,x*y/(x^2+y^2)],r=0..1,t=0..2*Pi,scaling=constrained,grid=[20,50]):

> with(plottools):

> vrml(e,"d:/009/12-11.wrl",background_color=white):

> e;

[Maple Plot]

Construct the solid enclosed by the paraboloids
z = 5x2 + 5y2 and z = 6 - 7x2 -y2.

> restart;

> x:=r*cos(t)/sqrt(2):y:=r*sin(t):

> z:=5*x^2+5*y^2:

> with(plots):

Warning, the name changecoords has been redefined

> a:=plot3d([x,y,z],r=0..1,t=0..2*Pi,scaling=constrained,color=blue):

> z:=6-7*x^2-y^2:

> b:=plot3d([x,y,z],r=0..1,t=0..2*Pi,scaling=constrained,color=red):

> e:=display(a,b):

> with(plottools):

> vrml(e,"d:/009/12-12.wrl",background_color=white):

> e;

[Maple Plot]

>