solid of rotation

2720 days 전, toed 작성

We devise a sort of generic curve.

f(x)=-(x-1)*(x-2)*(x-3)+1.5; plot(f,0.8,2.7) 
       

Now we use a parametric plot to rotate the curve around the $y$ axis. We also add plain disks to cap the ends, and make the surface partially transparent.

var ("u v") skin=parametric_plot3d([cos(v)*f(u),u,sin(v)*f(u)],(u,0.8,2.9),(v,0,2*pi),opacity=0.5,mesh=true)+parametric_plot3d([u*cos(v)*f(0.8),0.8,u*sin(v)*f(0.8)],(u,0,1),(v,0,2*pi),opacity=0.5)+parametric_plot3d([u*cos(v)*f(2.9),2.9,u*sin(v)*f(2.9)],(u,0,1),(v,0,2*pi),opacity=0.5); skin 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.

Now we make a representative disk.

a =2; disk=parametric_plot3d([cos(v)*f(a),u,sin(v)*f(a)],(u,a,a+0.1),(v,0,2*pi),aspect_ratio=1,color='red')+parametric_plot3d([u*cos(v)*f(a),a,u*sin(v)*f(a)],(u,0,1),(v,0,2*pi),aspect_ratio=1,color='red')+parametric_plot3d([u*cos(v)*f(a),a+0.1,u*sin(v)*f(a)],(u,0,1),(v,0,2*pi),aspect_ratio=1,color='red'); disk 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.

Display them together.

skin+disk 
       
Sleeping...
If no image appears re-execute the cell. 3-D viewer has been updated.