Oliver Knill’s Project, Math 21a, Fall, 2013

The assignment

Problem A  (2 points) Plot the parametrized surface r(u,v) = <x(u,v),y(u,v),z(u,v)> of your choice. Draw something pretty and new.

Problem B  (2 points) Choose a vector field F(x,y,z)  in space and draw a flow line. We want to see the field and the flow line.

Problem C  (6 points) Produce an object of your choice. Prepare it for 3D printing or inclusion into Google earth. Produce something on your own.

Problem A

r[u_,v_]:=(1+Cos[5u] Sin[4v]/10){Cos[u] Sin[3],Sin[u+v] Sin[v],Cos[v]};
ParametricPlot3D[r[u,v],{u,0,2Pi},{v,0,Pi}];

R=5;
S1=Graphics3D[Table[{Hue[Abs[v]/2],Tube[Table[r[u,v],{u,0,2Pi+1/R,1/R}]]},{v,0,Pi,1/R}]];S2=Graphics3D[Table[{Hue[Abs[u]/2],Tube[Table[r[u,v],{v,0,Pi+1/R,1/R}]]},{u,0,2Pi,1/R}]];
Show[{S1,S2}]

Problem B

RK[f_,x_,s_]:=Module[{a,b,c,u,v,w,q},u=s*f[x];
a=x+u/2;v=s*f[a];b=x+v/2;w=s*f[b];c=x+w;q=s*f[c];x+(u+2v+2w+q)/6];
F[{x_,y_,z_}]:={-y,x,1};
T[X_]:=RK[F,X,0.01];s=NestList[T,{3,1,5},5000];
S1=Graphics3D[{Yellow,Tube[s]}];
S2=VectorPlot3D[F[{x,y,z}],{x,-20,20},{y,-20,20},{z,0,40},VectorPoints->5];
S=Show[{S1,S2},AspectRatio->1,Boxed->False]

Problem C

SetOptions[Graphics3D,{AspectRatio->1,Boxed->False}];
S1=Graphics3D[{Green,Tube[Table[ {3Cos[t],3Sin[t],t},{t,0,10Pi,0.3}],0.4]}];
S2=Graphics3D[{Blue,Tube[Table[ {5Cos[t],5Sin[t],t},{t,0,10Pi,0.3}],0.4]}];
S3=Graphics3D[{Pink,Cuboid[{{-6,-6,0},{6,6,5}}]}];
S4=Graphics3D[{Yellow, Sphere[{0,0,30},5]}];
S=Show[{S1,S2,S3,S4}];
Export["genius.stl",S,"STL"]

Export["genius.3ds",S,"3DS"];

Import["genius.3ds"]