Construct one-half of a torus consisting of two intersecting circles

 

home


>    restart;

>    with(plots):

Warning, the name changecoords has been redefined

>    with(plottools):

Warning, the assigned name arrow now has a global binding

>    a:=2; b:=5; c:=sqrt(a^2+b^2);

a := 2

b := 5

c := 29^(1/2)

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

z := 2*sin(t)

r := 29^(1/2)+2*cos(t)

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

x := (29^(1/2)+2*cos(t))*cos(s)

y := (29^(1/2)+2*cos(t))*sin(s)

>    w:=solve(z=a/b*x,s);

w := arccos(5*sin(t)/(29^(1/2)+2*cos(t)))

>    p1:=plot3d([x,y,z],s=-w..w,t=0..Pi,scaling=constrained,grid=[50,50],color=blue,title="920937\n.half_torus"):

>    p2:=plot3d([x,y,z],s=-w..w,t=Pi..2*Pi,scaling=constrained,grid=[50,50],color=yellow):

>    h_torus:=display(p1,p2):

>    h_torus;

[Maple Plot]

>