next up previous contents
Next: Algebra and Calculus Up: A Simple Tour Previous: Numerical Calculations

Graphics

Plots of functions in 2D, e.g. generate a plot of tex2html_wrap_inline589 as a function of x from 0 to tex2html_wrap_inline565 :

In[11]:=
Plot[Sin[Exp[x]], {x,0,Pi}]

Out[11]=
-Graphics-

Replot last graphic with new display options:

In[12]:=
Show[%, Frame->True, FrameLabel -> {"Time", "Signal"},
GridLines -> Automatic]

Out[12]=
-Graphics-

Contour plots, e.g. generate a contour plot of tex2html_wrap_inline595 over the domain tex2html_wrap_inline597 :

In[13]:=
ContourPlot[ Sin[x + Sin[y]], {x,-2,2}, {y,-2,2}]

Out[13]=
-ContourGraphics-

Plot 3D surfaces, e.g. replot the above function as a 3D surface over the domain tex2html_wrap_inline599 :

In[14]:=
Plot3D[ Sin[x + Sin[y]], {x,-3,3}, {y,-3,3}]

Out[14]=
-SurfaceGraphics-

3D parametric surfaces: e.g. plot tex2html_wrap_inline601 over the domain tex2html_wrap_inline603 :

In[15]:=
ParametricPlot3D[ {u Sin[t], u Cos[t], t/3},
{t,0,15},{u,-1,1}, Ticks -> None]

Out[15]=
-Graphics3D-

and plot tex2html_wrap_inline605 over the domain tex2html_wrap_inline607 :

In[16]:=
ParametricPlot3D[ {Sin[t], Sin[2t]Sin[u], Sin[2t]Cos[u]},
{t,-Pi/2,Pi/2},{u,0,2Pi}, Ticks -> None]

Out[16]=
-Graphics3D-

Combine the last two plots:

In[17]:=
Show[%,%%]

Out[17]=
-Graphics3D-

Build up graphics from more basic objects:

In[18]:=
Show[ Graphics3D[{Cuboid[{0,0,0}], Cuboid[{2,2,2}],
 Cuboid[{2,1,3}], Cuboid[{3,2,1}], Cuboid[{2,1,1}]} ]] 

Out[18]=
-Graphics3D-

Sound output, e.g. plays a sound whose amplitude is given by tex2html_wrap_inline609 as a function of time t in seconds between t=-4 and t=4:

In[19]:=
Play[ Sin[10000 / t], {t,-4,4}]                       

Out[19]=
-Sound-



Harold Schranz
Tue Jul 1 19:43:28 EST 1997