|
實驗十 |
 |
restart;
a:=2;
b:=5;
c:=sqrt(a^2+b^2);
z:=a*sin(t);
r:=c+a*cos(t);
x:=r*cos(s);
y:=r*sin(s);
with(plots):
t:=2.5*s;
tubeplot([x,y,z],s=0..4*Pi,scaling=constrained,radius=1,grid=[201,11]); |
 |
restart;
a:=2;
b:=5;
c:=sqrt(a^2+b^2);
z:=a*sin(t);
r:=c+a*cos(t);
x:=r*cos(s);
y:=r*sin(s);
with(plots):
s:=1.5*t;
tubeplot([x,y,z],t=0..4*Pi,scaling=constrained,radius=1,grid=[201,11]); |
 |
restart;
with(plots):
tubeplot([cos(3*t),sin(4*t),sin(5*t)],t=0..2*Pi,scaling=constrained,radius=0.1,grid=[201,11]); |
 |
restart;
with(plots):
tubeplot([cos(13*t),sin(4*t),sin(17*t)],t=0..2*Pi,scaling=constrained,radius=0.1,grid=[201,11]); |
 |
restart;
with(plots):
a:=2;
b:=5;
c:=sqrt(a^2+b^2);
q:=tubeplot([b*cos(t),a+c*sin(t),a*cos(t)],t=0..2*Pi,radius=0.5,scaling=constrained):
with(plottools):
for n to 5 do p[n]:=rotate(q,0,0,2*Pi*n/5):
od:
display(p[k]$k=1..5,scaling=constrained); |
 |
restart;
with(plots):
with(plottools):
a:=coordplot(cartesian,[-10..10,-10..10],scaling=constrained):
f:=transform((x,y)->[2*x/(x^2+y^2+1),2*y/(x^2+y^2+1),(x^2+y^2-1)/(x^2+y^2+1)]):
b:=display(f(a),scaling=constrained):
c:=sphere([0,0,0],0.99,style=patchnogrid,color=yellow):
display(b,c); |
 |
restart;
z:=sin(t);
r:=3+cos(t);
x:=7+r*cos(s);
y:=r*sin(s);
q:=expand([x,y,z]/(x^2+y^2+z^2)):
plot3d(q,s=0..2*Pi,t=0..2*Pi,scaling=constrained,grid=[101,101],style=patchnogrid);
|
 |
restart;
with(plots):
with(plottools):
f:=transform((x,y,z)->expand([x,y,z]/(x^2+y^2+z^2))):
p1:=sphere([5,-1,-1],sqrt(2)):
p2:=sphere([7,1,-1],sqrt(2)):
p3:=sphere([7,-1,1],sqrt(2)):
p4:=sphere([5,1,1],sqrt(2)):
display(f(p1),f(p2),f(p3),f(p4),scaling=constrained,style=patchnogrid); |
 |
restart;
with(plots):
tubeplot([t*cos(t),t*sin(t),2*t],t=0..4*Pi,radius=t/2,scaling=constrained,style=patchnogrid); |
 |
restart;
x:=cos(u)^3*cos(v)^3;
y:=sin(u)^3*cos(v)^3;
z:=sin(v)^3;
plot3d([x,y,z],u=0..2*Pi,v=0..2*Pi,scaling=constrained,grid=[51,51],style=patchnogrid); |