Construct a VRML file illustrating the intersection of two cylinders having the same radius, with axes meet and perpendicular to each other.
> restart;
> x:=cos(t):
> y:=sin(t):
> z1:=x:
> z2:=-x:
> z:=(1-s)*z1+s*z2:
> a:=plot3d([x,y,z],s=0..1,t=0..2*Pi,scaling=constrained,color=green):
> b:=plot3d([z,y,x],s=0..1,t=0..2*Pi,scaling=constrained,color=blue):
> with(plots):
Warning, the name changecoords has been redefined> with(plottools):
> c:=display(a,b):
> vrml(c,"d:/9/10-1.wrl",background_color=white);
> c;
Construct the portion of the cylinder x2 + z2 = 0.81 lying outside x2 + y2 =1.
> restart;
> x:=0.9*cos(t):z:=0.9*sin(t):
> y1:=sqrt(1-x^2):
> y2:=2:
> y:=(1-s)*y1+s*y2:
> a:=plot3d([x,y,z],t=0..2*Pi,s=0..1,scaling=constrained,color=red):
> b:=plot3d([x,-y,z],t=0..2*Pi,s=0..1,scaling=constrained,color=red):
> x:=cos(t):y:=sin(t):
> z1:=x:z2:=-x:
> z:=(1-s)*z1+s*z2:
> c:=plot3d([y,x,z],t=0..2*Pi,s=0..1,scaling=constrained,color=blue):
> d:=plot3d([y,x,z],t=0..2*Pi,s=0..1,scaling=constrained,color=blue):
> with(plots):
Warning, the name changecoords has been redefined> e:=display(a,b,c,d):
> with(plottools):
> vrml(e,"d:/9/10-2.wrl",background_color=white);
> e;
Construct the solid bounded by the
parabolic cylinder
z = 4 -
y2
and the elliptic
paraboloid
z = x2 +
3y2.
>
> restart;
> x:=2*r*cos(t):
> y:=r*sin(t):
> z:=4-y^2:
> a:=plot3d([x,y,z],t=0..2*Pi,r=0..1,scaling=constrained,color=yellow):
> z:=x^2+3*y^2:
> b:=plot3d([x,y,z],t=0..2*Pi,r=0..1,scaling=constrained,color=green):
> with(plots):
Warning, the name changecoords has been redefined> c:=display(a,b):
> with(plottools):
> vrml(c,"d:/9/10-3.wrl",background_color=white):
> c;
Construct the Astroidal Ellipsoid given
by
x =
(cos(u)cos(v))3,
y =
(sin(u)cos(v))3
z =
sin3(v)
> restart;
> x:=(cos(u)*cos(v))^3:
> y:=(sin(u)*cos(v))^3:
> z:=sin(v)^3:
> a:=plot3d([x,y,z],u=0..2*Pi,v=0..2*Pi,scaling=constrained,color=green):
> with(plottools):
> vrml(a,"d:/9/10-4.wrl",background_color=white);
> a;
Construct this surface:
> restart;
> x:=r*cos(t):
> y:=r*sin(t):
> r:=0.05*t:
> c:=plot3d([s*x,s*y,(1-s)],s=0..1,t=0..30,scaling=constrained,grid=[5,200],color=COLOR(RGB,1,0.7,0.3)):
> with(plottools):
> vrml(c,"d:/9/10-5.wrl",background_color=white);
> c;
Construct this surface:
> restart;
> r:=exp(-t):
> z:=r*cos(s/2):x:=r*sin(s/2):y:=t+0.1*s:
> c:=plot3d([x,y,z],s=0..12*Pi,t=1..6,grid=[200,20],color=green):
> with(plottools):
> vrml(c,"d:/9/10-6.wrl",background_color=white):
> c;
>