restart:
with(plots): with(plottools):
StereoPlot:=proc(eq,n::posint)
local p1, p2, p4:
p1:=implicitplot3d(eq, x=-5..5,y=-5..5,z=-5..5, color=red, transparency=.7, light=[60,30,1,0,0], grid=[15,15,15], _passed[3..-1]):
p2:=implicitplot3d(eq, x=-5..5,y=-5..5,z=-5..5, color=cyan, transparency=.7, light=[60,27.5,0,.5,.5], grid=[15,15,15], _passed[3..-1]):
p4:=display([rotate(p2,0,0,Pi/72),p1]):
animate(rotate,[p4,0,0,2*Pi*t/n], t=0..n-1, orientation=[0,75], frames=n, paraminfo=false);
end proc:
Hyperboloid of 2 sheets:
eq:=x^2-y^2-z^2=1;
q1:=StereoPlot(eq, 24, style=wireframe, scaling=constrained);
q2:=StereoPlot(eq, 24, style=surface, scaling=constrained);
display(q1,q2);
q1;
q2;
Hyperboloid of 1 sheet:
eq:=-x^2+y^2+z^2=1;
q1:=StereoPlot(eq, 24, style=wireframe, scaling=constrained);
q2:=StereoPlot(eq, 24, style=surface, scaling=constrained);
display(q1,q2);
q1;
q2;
Elliptical Paraboloid
eq:=x-y^2-z^2=0;
StereoPlot(eq, 24, style=hidden);
Hyperbolic Paraboloid
eq:=x-y^2+z^2=0;
q1:=StereoPlot(eq, 24, style=wireframe, scaling=constrained);
q2:=StereoPlot(eq, 24, style=surface, scaling=constrained);
display(q1,q2);
q1;
q2;
Monkey Saddle
eq:=z=x*y^2-x^3;
q1:=StereoPlot(eq, 24, style=wireframe, scaling=constrained);
q2:=StereoPlot(eq, 24, style=surface, scaling=constrained);
display(q1,q2);
q1;
q2;
Dog Saddle
eq:=z=x*y^3-y*x^3;
StereoPlot(eq, 24, style=hidden);
p1:=plot3d(x^2-y^2, x=-5..5,y=-5..5, color=red, transparency=.5, orientation=[0,80], style=patchnogrid, light=[60,30, 1, 0, 0]): p1;
p2:=plot3d(x^2-y^2, x=-5..5,y=-5..5, color=blue, transparency=.5, orientation=[0,82.5], style=patchnogrid, light=[60,30, 0, 0, 1]): p2;
display([p1,rotate(p2,0,0,Pi/72)]);