>with(plots): >f:=(x,y)->25-x^2+1/300*y^4-y^2; >blob:=z=x^2+3.7*y^2; >plot3d(f(x,y),x=-10..10,y=-15..15,axes=boxed); >implicitplot3d({f(x,y)=z,blob},x=-10..10,y=-15..15,z=-200..200,axes=boxed, numpoints=2000,style=wireframe,color=aquamarine);Remember the definition of a function when entering your shape. For example, the sphere can be entered as two functions or as one implicit expression.
>f:=(x,y)->sqrt(-x^2-y^2+1);g:=(x,y)->-sqrt(-x^2-y^2+1); >plot3d({f(x,y),g(x,y)},x=-1..1,y=-1..1,numpoints=15000,scaling=constrained, style=patchnogrid,axes=boxed); >h:=x^2+y^2+z^2=1; >implicitplot3d(h,x=-1..1,y=-1..1,z=-1..1,axes=boxed);To look at the cross-section of the sphere you cut the sphere along a plane - i.e. you hold a variable constant. So the intersection of the sphere and the plane is:
> implicitplot(subs(z=1/2,h),x=-1..1,y=-1..1);Notice that the plot is a two-dimensional circle. To intersect vertical planes hold the or constant.
> implicitplot({subs(x=1,h),subs(x=1/3,h)},y=-1..1,z=-1..1,labels=[y,z]);Other three-dimensional shapes can be made from known conic sections. A few of these will be analyzed in the exercises.