In [1]:
from sage.plot.plot3d.plot3d import axes
l = axes(1, 0.2)

t,r,theta,z=var('t,r,theta, z')
SR=Cylindrical('radius', ['azimuth', 'height'])
r1 = [0.6, 1]
p1 = [plot3d(a,(theta, pi/4, pi/3),(z,0.5,1), transformation=SR, opacity=0.6,color='blue') for a in r1]
SZ=Cylindrical('height' , ['radius' ,'azimuth'])
z1 = [0.5, 1]
p2 = [plot3d(b,  (r,0.6,1), (theta, pi/4, pi/3), transformation=SZ, opacity=0.6,color='red') for b in z1]
ST=Cylindrical( 'azimuth' , ['radius', 'height'])
T1 = [pi/4, pi/3]
p3 = [plot3d(c, (r,0.6,1),(z,0.5,1), transformation=ST, opacity=0.6,color='green') for c in T1]
p4=polar_plot(1,(t,pi/4,pi/3),fill=True,thickness=50)
p4+=polar_plot(0.6,(t,pi/4,pi/3),fill=True,color='red')
L1=line([(0,0,0),(cos(pi/4),sin(pi/4),0)] ,opacity=0.5,linestyles='dashdot')
L1+=line([(0,0,0),(cos(pi/3),sin(pi/3),0)],opacity=0.5)
V1=line([(cos(pi/3),sin(pi/3),0),(cos(pi/3),sin(pi/3),1)],linestyles='dash',color='black')
V1+=line([(cos(pi/4),sin(pi/4),0),(cos(pi/4),sin(pi/4),1)],linestyles='dash',color='black')
V1+=line([(0.6*cos(pi/4),0.6*sin(pi/4),0),(0.6*cos(pi/4),0.6*sin(pi/4),1)],linestyles='dash',color='black')
V1+=line([(0.6*cos(pi/3),0.6*sin(pi/3),0),(0.6*cos(pi/3),0.6*sin(pi/3),1)],linestyles='dash',color='black')

show(sum(p1+p2+p3)+l+p4+L1+V1,frame=False)

solid enclosed by the paraboloids $ z=x^2+y^2$ and $ z=5-x^2-y^2$

In [2]:
from sage.plot.plot3d.plot3d import axes
l = axes(2, 1)
t,r,theta,z=var('t,r,theta, z')
SZ=Cylindrical('height' , ['radius' ,'azimuth'])
p1 = plot3d(r^2,  (r,0,sqrt(5/2)), (theta, 0, 2*pi), transformation=SZ, opacity=0.6,color='green')
p2 = plot3d(5-r^2,  (r,0,sqrt(5/2)), (theta, 0, 2*pi), transformation=SZ, opacity=0.6,color='red')
p3=polar_plot(sqrt(5/2),(t,0,2*pi),fill=True)
(p1+p2+p3+l).show(frame=False)

solid enclosed by the paraboloids $ z=x^2+y^2$ and $ z=36-3x^2-3y^2$

In [3]:
from sage.plot.plot3d.plot3d import axes
l = axes(15, 1)
t,r,theta,z=var('t,r,theta, z')
SZ=Cylindrical('height' , ['radius' ,'azimuth'])
p1 = plot3d(r^2,  (r,0,3), (theta, 0, 2*pi), transformation=SZ, opacity=0.6,color='blue')
p2 = plot3d(36-3*r^2,  (r,0,3), (theta, 0, 2*pi), transformation=SZ, opacity=0.6,color='red')
p3=polar_plot(3,(t,0,2*pi),fill=True)
(p1+p2+p3+l).show(frame=False)

ทรงสามมิติ ภายในทรงกระบอก $ x^2+y^2=1 $ เหนือระนาบ $ z = 0 $ ใต้ กรวย $ z^2 = 4x^2+4y^2 $

In [ ]:
 
In [4]:
from sage.plot.plot3d.plot3d import axes
l = axes(3, 1)
t,r,theta,z=var('t,r,theta, z')
SR=Cylindrical('radius', ['azimuth', 'height'])
p1 = plot3d(1,(theta,0, 2*pi),(z,0,2), transformation=SR, opacity=0.5,color='blue') 
p2 = plot3d(z/2,(theta,0, 2*pi),(z,0,2), transformation=SR,color='red') 
p3 = polar_plot(1,(t,0,2*pi),fill=True) 
(p1+p2+p3+l).show(frame=False)

ระหว่าง ทรงกระบอก $ x^2+y^2=1 $ กับทรงกลม $ x^2+y^2+z^2=4 $

In [5]:
from sage.plot.plot3d.plot3d import axes
l = axes(3, 1)
t,r,theta,z=var('t,r,theta, z')
SR=Cylindrical('radius', ['azimuth', 'height'])
p1 = plot3d(1,(theta,0, 2*pi),(z,-sqrt(3),sqrt(3)), transformation=SR ,color='blue') 
p2 = plot3d(sqrt(4-z^2),(theta,0, 2*pi),(z,-sqrt(3),sqrt(3)), transformation=SR,opacity=0.5,color='red') 
p3 = polar_plot(2,(t,0,2*pi),fill=True) 
(p1+p2+p3+l).show(frame=False)

ระหว่าง ทรงกรวย $ z=\sqrt{x^2+y^2} $ กับทรงกลม $ x^2+y^2+z^2=2 $

In [6]:
from sage.plot.plot3d.plot3d import axes
l = axes(2, 0.5)
t,r,theta,z=var('t,r,theta, z')
SR=Cylindrical('radius', ['azimuth', 'height'])
p1 = plot3d(z,(theta,0, 2*pi),(z,0,1), transformation=SR ,color='blue') 
rho, phi, theta = var('rho phi theta')
SPR = Spherical('radius' , ['inclination', 'azimuth'])
p2 = plot3d(sqrt(2),  (phi,pi/4,pi),(theta, 0, 2*pi), transformation=SPR, opacity=0.5,color='red')
p3 = polar_plot(sqrt(2),(t,0,2*pi),fill=True) 
(p1+p2+p3+l).show(frame=False)

ระหว่าง ทรงพาราโบลอย $ z=x^2+y^2 $ กับทรงกลม $ x^2+y^2+z^2=2 $

In [7]:
from sage.plot.plot3d.plot3d import axes
l = axes(2, 0.5)
t,r,theta,z=var('t,r,theta, z')
SR=Cylindrical( 'height', ['azimuth', 'radius'])
p1 = plot3d(r^2,(theta,0, 2*pi),(r,0,1), transformation=SR ,color='blue') 
rho, phi, theta = var('rho phi theta')
SPR = Spherical('radius' , ['inclination', 'azimuth'])
p2 = plot3d(sqrt(2),  (phi,pi/4,pi),(theta, 0, 2*pi), transformation=SPR, opacity=0.5,color='red')
p3 = polar_plot(sqrt(2),(t,0,2*pi),fill=True) 
(p1+p2+p3+l).show(frame=False)
In [ ]: