W e bgin by drawing the union of three mutually orthogonal sections of cylindrical pipe. All three can be drawn simultaneously by arranging their formulas in a list.
ParametricPlot3D[{{v,Cos[u],Sin[u]},
{Cos[u],v,Sin[u]}, {Cos[u],Sin[u],v}},
{v,-5,5},{u,0,2Pi},
Axes->False, Boxed->False,
PlotPoints->18, ImageSize->180]
We think of this figure as a crudely representation of a smoothsurface in
R3. It takes more work, and more computer memory, to make
this smoothness evident (see below).
Clearly, any 3-dimensional skeletal structure can be built by combining more
and more lengths of pipe, crossing in any desired fashion. As a simple example,
here is a way to assembling eight equal lengths of pipe in a 2x2x2 cubical array.
The commands for this structure can be omitted since they are a simpler versions
of later ones.
For picturing a structure composed of several pieces, Mathematica has the
convenient ability to plot -- but not display -- each piece. It suffices to include
the following option in each plotting command:
DisplayFunction->Identity.
This conserves memory and reduces clutter. When all the subordinate plots are ready, the entire assembly can be displayed using the command Show with the following "reversal" option included.
DisplayFunction->$DisplayFunction
Since jungle gyms are usually cubical structures, we continue to the 3x3x3 case. As before, we plot several functions simultaneously by giving them in a list. Here, q[a,b] orders Mathematica to plot (without display) sections of pipe running in the positive x-, y-, and z-directions, with the pipe axes starting, respectively,
at (0,a,b), (a,0,b), and (a,b,0).
q[a_,b_]:= ParametricPlot3D[{{v,a+Cos[u],b+Sin[u]},
{a+Cos[u],v,b+Sin[u]}, {a+Cos[u],b+Sin[u],v}},
{v,-4,24},{u,0,2Pi}, PlotPoints->14,
DisplayFunction->Identity]
With this notation, the required 27 pipes can be plotted by this command:
Show[{q[0,0],q[0,10],q[0,20],
Boxed->False,Axes->False,ImageSize->432,
DisplayFunction->$DisplayFunction]
Now we show how to build a jungle gym that looks like a smooth surface.
one whose Gaussian curvature K is negative, except at rare points where K=0.
(The pipes used above had K=0 almost everywhere.)
The starting point is Kummer's surface, a level surface of the function
f=x2y2+
y2z2+
z2x2.
A small part of this surface will serve as a smooth connection joint.
To plot level surfaces we call up a command from Mathematica's Graphics
package.
<<Graphics`ContourPlot3D`
Then the joint (on the left, below) is given by
joint = ContourPlot3D[
x^2y^2+y^2z^2+z^2x^2,
{x,-1.8,1.8},{y,-1.8,1.8},{z,-1.8,1.8},
Boxed->False, Axes->False, ImageSize->100]
For the pipes we use a surface of revolution with profile curve
h(v)=1+(v-5)2/50 (on the right, here).
The joint and sample pipe are modified and redrawn till they fit together
reasonably well.
Then all six pipes can be plotted (without display) by this command:
allpipes = ParametricPlot3D[{
{v,h[v]*Cos[u],h[v]*Sin[u]},{-v,h[v]*Cos[u],h[v]*Sin[u]},
{h[v]*Cos[u],v,h[v]*Sin[u]},{h[v]*Cos[u],-v,h[v]*Sin[u]},
{h[v]*Cos[u],h[v]*Sin[u],v},{h[v]*Cos[u],h[v]*Sin[u],-v}},
{v,1.7,5},{u,0,2Pi}, PlotPoints->{8,24}, Boxed->False,
Axes->False, ImageSize->240, DisplayFunction->Identity]
Finally, the pipes are attached to the joint by:
Show[{joint,allpipes},ImageSize->240,
DisplayFunction->$DisplayFunction]
Since h">0, the surface of revolution used above has negative curvature K<0
everywhere, and Kummer's surface has K<0 except for some rare symmetrical points where K=0. (See Kummer's surface.) Thus any jungle gym built by assembling such units--even an infinite one--will also have K<0 except at the symmetrical points, where K=0.
q[10,0],q[10,10],q[10,20],
q[20,0],q[20,10],q[20,20]},
Now we proceed to the 4x4x4 case. The only change needed in the command
q[a_,b_] is enlargement of the range of v to {v,-4,34}. For the
Show command the 3x3 array of q's must be enlarged to 4x4, with first row
q[0,0],q[0,10],q[0,20], q[0,30], and a better ImageSize than 432 is 576
(=8 inches).
