Mathematica Laboratory

Two options:

3D printing Google earth
Export as "STL" or "WRL" and submit to a printing service like Shapeways or Scupteo to see whether it would print. You do not have to print. You submit only the Mathematica file in the form "FirstNameLastName.nb" and indicate "3D print" somewhere in problem C. If the 3D printing process fails, don't worry, but tell in the project that it did not work. Export as "3DS" and import into Sketchup (proversion is free for 8 hours) to see whether it imports. From there, you export to google earth. Indicate somewhere in problem C that the object is for google earth. Submit the Mathematica file in the form "FirstNameLastName.nb". If the Google earth export fails, don't worry but tell in the project that it did not work.
Here is an example on how to save a 3DS object or STL
S=Graphics3D[ Sphere[{0,0,0},1]]; Export["sphere.3ds",S,"3DS"]; Export["sphere.stl",S,"STL"]
The model we built in the Mathematica workshop is here. It is called "genius" because it is the perfect bridge between a cuboid and a sphere. A three dimensional quadrature of the circle. This quadrature of the sphere is simple, sublime and spectacular. It also shows a football elevated to a trophy predicting a Harvard win on Sunday.
And here is the project built live during the workshop. And here is the video (M4V).

FAQ

  • The Mathematica program can be obtained here. The current version is Mathematica 8.04. During installation you will be prompted for an Activation Key. Students Faculty/Staff. Make sure to use your Harvard email address when registering. Contact me (knill@math.harvard.edu) if you plan to use Mathematica on a linux system.
  • Mathematica is started like any other application on Macintoshs or PC's. On Linux, just type "mathematica" in a terminal to start the notebook version, or "math" to start the terminal version.
  • Once Mathematica is running, copy paste any of the following lines into a cell, click with the mouse somewhere into the cell, then hold "Shift" and hit "Enter".
Some frequently used commands:

Plot[ x Sin[x],{x,-10,10}] Graph function of one variable
Plot3D[ Sin[x y],{x,-2,2},{y,-2,2}] Graph function of two variables
ParametricPlot[ {Cos[3 t],Sin[5 t]} ,{t,0,2Pi}] Plot planar curve
ParametricPlot3D[{Cos[t],Sin[t],t} ,{t,0,4Pi},AspectRatio->1] Plot space curve
ParametricPlot3D[{Cos[t] Sin[s],Sin[t] Sin[s],Cos[s]},{t,0,2Pi},{s,0,Pi}] Parametric Surface
SphericalPlot3D[(2+Sin[2 t] Sin[3 s]),{t,0,Pi},{s,0,2 Pi}] Spherical Plot
RevolutionPlot3D[{2 + Cos[t], t}, {t,0,2 Pi}] Revolution Plot
ContourPlot[Sin[x y],{x,-2,2},{y,-2,2} ] Contour lines (traces)
ContourPlot3D[x^2+2y^2-z^2,{x,-2,2},{y,-2,2},{z,-2,2}] Implicit surface
VectorPlot[{x-y,x+y},{x,-3,3},{y,-3,3}] Vectorfield plot
VectorPlot3D[{x-y,x+y,z},{x,-3,3},{y,-3,3},{z,0,1}] Vectorfield plot 3D
Integrate[x Sin[x], x] Integrate symbolically
Integrate[x y^2-z,{x,0,2},{y,0,x},{z,0,y}] 3D Integral
NIntegrate[Exp[-x^2],{x,0,10}] Integrate numerically
D[ Cos^5[x],x ] Differentiate symbolically
Series[Exp[x],{x,0,3} ] Taylor series
DSolve[ x''[t]==-x[t],x,t ] Solution to ODE
DSolve[{D[u[x,t],t]==D[u[x,t],x],u[x,0]==Sin[x]},u[x,t],{x,t}] Solution to PDE
Classify extrema:
ClassifyCriticalPoints[f_,{x_,y_}]:=Module[{X,P,H,g,d,S}, X={x,y};
P=Sort[Solve[Thread[D[f,#] & /@ X==0],X]]; H=Outer[D[f,#1,#2]&,X,X];g=H[[1,1]];d=Det[H];
S[d_,g_]:=If[d<0,"saddle",If[g>0,"minimum","maximum"]];
TableForm[{x,y,d,g,S[d,g],f} /.P,TableHeadings->{None,{x,y,"D","f_xx","Type","f"}}]]
ClassifyCriticalPoints[4 x y - x^3 y - x y^3,{x,y}]
Solve a Lagrange problem with 2 variables
F[x_,y_]:=2x^2+4 x y;     G[x_,y_]:=x^2 y;
Solve[{D[F[x,y],x]==L*D[G[x,y],x],D[F[x,y],y]==L*D[G[x,y],y],G[x,y]==1},{x,y,L}]
With 3 variables
F[x_,y_,z_]:=2x^2+4 x y+z;     G[x_,y_,z_]:=x^2 y + z;   c=1; 
Solve[{D[F[x,y,z],x]==L*D[G[x,y,z],x],
       D[F[x,y,z],y]==L*D[G[x,y,z],y],
       D[F[x,y,z],z]==L*D[G[x,y,z],z],
       G[x,y,z]==c},{x,y,z,L}]
With 3 variables and two constraints
F[x_,y_,z_]:=z;     G[x_,y_,z_]:=z^2-x^2-y^2;  H[x_,y_,z_]:=4x-3y+8z; c=0; d=5; 
Solve[{D[F[x,y,z],x]==L*D[G[x,y,z],x] + M D[H[x,y,z],x],
       D[F[x,y,z],y]==L*D[G[x,y,z],y] + M D[H[x,y,z],y],
       D[F[x,y,z],z]==L*D[G[x,y,z],z] + M D[H[x,y,z],z],
       G[x,y,z]==c,
       H[x,y,z]==d},
{x,y,z,L,M}]
Check that a function solves a PDE:
f[t_,x_]:=(x/t)*Sqrt[1/t]*Exp[-x^2/(4 t)]/(1+ Sqrt[1/t] Exp[-x^2/(4 t)]);
D[f[t,x],t]+f[t,x]*D[f[t,x],x]-D[f[t,x],{x,2}]
Simplify[%] Chop[%]