9.mws

Construct the sphere with the command "plot3d".

> restart;

> r:=sin(s):

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

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

[Maple Plot]

Construct the sphere with this pattern:

> restart;

> r:=sin(s):

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

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

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

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

> d:=plot3d([x,y,z],s=0..Pi,t=3*Pi/2..2*Pi,scaling=constrained,color=yellow):

> with(plots):

Warning, the name changecoords has been redefined
> display(a,b,c,d);

[Maple Plot]

Construct the sphere with this pattern:

> restart;

> r:=sin(s):

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

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

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

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

> a4:=plot3d([x,y,z],s=0..Pi,t=Pi..4*Pi/3,scaling=constrained,color=yellow):

> a5:=plot3d([x,y,z],s=0..Pi,t=4*Pi/3..5*Pi/3,scaling=constrained,color=brown):

> a6:=plot3d([x,y,z],s=0..Pi,t=5*Pi/3..2*Pi,scaling=constrained,color=cyan):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,a5,a6);

[Maple Plot]

Construct the sphere with this pattern:

> restart;

> r:=sin(s):

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

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

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

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

> d:=plot3d([x,y,z],s=0..Pi,t=3*Pi/2..2*Pi,scaling=constrained,color=yellow):

> with(plots):

Warning, the name changecoords has been redefined
> display(a,b,c,d);

[Maple Plot]

Construct the part of the cylinder (x - 0.5)2 + y2 = 0.25 lying inside the sphere x2 + y2 + z2 =1.

> restart;

> x:=0.5+0.5*cos(t):y:=0.5*sin(t):

> z1:=sqrt(1-x^2-y^2):

> z2:=-z1:

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

> with(plots):

> plot3d([x,y,z],s=0..1,t=0..2*Pi,scaling=constrained,grid=[5,100],color=blue);

[Maple Plot]

Construct the intersection of the cylinder (x - 0.5)2 + y2 = 0.25 and the sphere x2 + y2 + z2 =1.

> restart;

> x:=0.5+0.5*cos(t):y:=0.5*sin(t):

> z1:=sqrt(1-x^2-y^2):

> z2:=-z1:

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

> with(plots):

Warning, the name changecoords has been redefined
> a1:=plot3d([x,y,z],s=0..1,t=0..2*Pi,scaling=constrained,grid=[5,100],color=cyan):

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

> z:=sqrt(1-x^2-y^2):

> a2:=plot3d([x,y,z],r=0..0.5,t=0..2*Pi,scaling=constrained,grid=[5,100],color=red):

> a3:=plot3d([x,y,-z],r=0..0.5,t=0..2*Pi,scaling=constrained,grid=[5,100],color=green):

> with(plottools):

> display(a1,a2,a3);

[Maple Plot]

Construct the sphere with the command "sphere" in "plottools".

> restart;

> with(plottools):

> a:=sphere([0,0,0],1,grid=[50,50]):

> with(plots):

Warning, the name changecoords has been redefined
> display(a,scaling=constrained);

[Maple Plot]

Construct eight spheres of the same size each touching three others.

> restart;

> with(plottools):

> a1:=sphere([1,1,1],1,grid=[50,50],color=red):

> a2:=sphere([1,1,-1],1,grid=[50,50],color=blue):

> a3:=sphere([1,-1,1],1,grid=[50,50],color=green):

> a4:=sphere([1,-1,-1],1,grid=[50,50],color=yellow):

> a5:=sphere([-1,1,1],1,grid=[50,50],color=coral):

> a6:=sphere([-1,1,-1],1,grid=[50,50],color=grey):

> a7:=sphere([-1,-1,1],1,grid=[50,50],color=magenta):

> a8:=sphere([-1,-1,-1],1,grid=[50,50],color=cyan):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,a5,a6,a7,a8,scaling=constrained);

[Maple Plot]

Construct four mutually tangent spheres of the same size:

> restart;

> with(plottools):

> r:=sqrt(2):

> a1:=sphere([1,1,1],r,grid=[50,50],color=red):

> a2:=sphere([1,-1,-1],r,grid=[50,50],color=yellow):

> a3:=sphere([-1,1,-1],r,grid=[50,50],color=green):

> a4:=sphere([-1,-1,1],r,grid=[50,50],color=blue):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,scaling=constrained);

[Maple Plot]

Construct six spheres of the same size each touching four others.

> restart;

> with(plottools):

> r:=sqrt(2)/2:

> a1:=sphere([1,0,0],r,color=red):

> a2:=sphere([0,1,0],r,color=yellow):

> a3:=sphere([0,0,1],r,color=green):

> a4:=sphere([-1,0,0],r,color=blue):

> a5:=sphere([0,-1,0],r,color=coral):

> a6:=sphere([0,0,-1],r,color=cyan):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,a5,a6,scaling=constrained);

[Maple Plot]

Construct twelve spheres of the same size each touching five others.

> restart;

> x:=sqrt(5)/2-1/2:

> y:=1:

> with(plottools):

> a1:=sphere([x,y,0],x,color=red):

> a2:=sphere([x,-y,0],x,color=green):

> a3:=sphere([-x,-y,0],x,color=blue):

> a4:=sphere([-x,y,0],x,color=yellow):

> b1:=sphere([0,x,y],x,color=cyan):

> b2:=sphere([0,x,-y],x,color=magenta):

> b3:=sphere([0,-x,-y],x,color=grey):

> b4:=sphere([0,-x,y],x,color=coral):

> c1:=sphere([y,0,x],x,color=yellow):

> c2:=sphere([-y,0,x],x,color=brown):

> c3:=sphere([-y,0,-x],x,color=green):

> c4:=sphere([y,0,-x],x,color=coral):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4,scaling=constrained);

[Maple Plot]


Construct twenty spheres of the same size each touching three others.

> restart;

> p:=2*Pi/5:

> q:=(sqrt(5)+1)/2:

> with(plottools):

> r:=2*sin(p/2):

> a1:=sphere([2*cos(p),2*sin(p),q+1],r,color=red):

> a2:=sphere([2*cos(2*p),2*sin(2*p),q+1],r,color=red):

> a3:=sphere([2*cos(3*p),2*sin(3*p),q+1],r,color=red):

> a4:=sphere([2*cos(4*p),2*sin(4*p),q+1],r,color=red):

> a5:=sphere([2*cos(5*p),2*sin(5*p),q+1],r,color=red):

> b1:=sphere([2*q*cos(p),2*q*sin(p),q-1],r,color=yellow):

> b2:=sphere([2*q*cos(2*p),2*q*sin(2*p),q-1],r,color=yellow):

> b3:=sphere([2*q*cos(3*p),2*q*sin(3*p),q-1],r,color=yellow):

> b4:=sphere([2*q*cos(4*p),2*q*sin(4*p),q-1],r,color=yellow):

> b5:=sphere([2*q*cos(5*p),2*q*sin(5*p),q-1],r,color=yellow):

> c1:=sphere(-[2*cos(5*p),2*sin(5*p),q+1],r,color=blue):

> c2:=sphere(-[2*cos(4*p),2*sin(4*p),q+1],r,color=blue):

> c3:=sphere(-[2*cos(3*p),2*sin(3*p),q+1],r,color=blue):

> c4:=sphere(-[2*cos(2*p),2*sin(2*p),q+1],r,color=blue):

> c5:=sphere(-[2*cos(p),2*sin(p),q+1],r,color=blue):

> d1:=sphere(-[2*q*cos(5*p),2*q*sin(5*p),q-1],r,color=green):

> d2:=sphere(-[2*q*cos(4*p),2*q*sin(4*p),q-1],r,color=green):

> d3:=sphere(-[2*q*cos(3*p),2*q*sin(3*p),q-1],r,color=green):

> d4:=sphere(-[2*q*cos(2*p),2*q*sin(2*p),q-1],r,color=green):

> d5:=sphere(-[2*q*cos(p),2*q*sin(p),q-1],r,color=green):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,a5,b1,b2,b3,b4,b5,c1,c2,c3,c4,c5,d1,d2,d3,d4,d5,scaling=constrained);

[Maple Plot]

Construct twelve spheres of the same size each touching four others.

> restart;

> with(plottools):

> p:=sqrt(2)/2:

> a1:=sphere([1,0,1],p,color=red):

> a2:=sphere([0,1,1],p,color=blue):

> a3:=sphere([-1,0,1],p,color=green):

> a4:=sphere([0,-1,1],p,color=yellow):

> b1:=sphere([1,0,-1],p,color=cyan):

> b2:=sphere([0,1,-1],p,color=magenta):

> b3:=sphere([-1,0,-1],p,color=grey):

> b4:=sphere([0,-1,-1],p,color=coral):

> c1:=sphere([1,1,0],p,color=brown):

> c2:=sphere([1,-1,0],p,color=pink):

> c3:=sphere([-1,-1,0],p,color=blue):

> c4:=sphere([-1,1,0],p,color=green):

> with(plots):

Warning, the name changecoords has been redefined
> display(a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4,scaling=constrained);

[Maple Plot]

>