The Mathematica Journal
Download This Issue
Feature Articles
Graphics Gallery
Tricks of the Trade
In and Out
The Mathematica Programmer
New Products
New Publications
News Bulletins
Editor's Pick
Write Us
About the Journal
Staff and Contributors
Back Issues

Three-Dimensional Plots

In three dimensions the domain is not a single interval, but a Cartesian product of two intervals. We have already designed our code to work with lists of intervals that are applied to functions of several arguments using Apply[[Graphics:../Images/index_gr_178.gif] ,[Graphics:../Images/index_gr_179.gif] ]. The remaining changes required are the splitting of domains into four subdomains using Distribute and replacing rectangles by cuboids and Graphics by Graphics3D. The code of IntervalPlot[expr, {x, [Graphics:../Images/index_gr_180.gif], [Graphics:../Images/index_gr_181.gif]} , {y, [Graphics:../Images/index_gr_182.gif], [Graphics:../Images/index_gr_183.gif]} ] is shown in Listing 2.

Options[IntervalPlot3D] = { Tolerance -> 0.05 }

split[l_List] := Distribute[split /@ l, List, List]

rect[l:{_,_,_}] := Cuboid[Min /@ l, Max /@ l]

RectangleGraph[l:{{_,_,_}..}] :=
    Graphics3D[{EdgeForm[Thickness[0]], rect /@ l}]

IntervalPlot3D[expr_, {x_Symbol, x0_, x1_}, {y_Symbol, y0_, y1_},
  With[{tol = (x1-x0)Tolerance /. {opts} /. Options[IntervalPlot3D]},
        finals = refine[Function[{x,y},expr],
                        Interval /@ N[{{x0, x1}, {y0, y1}}], tol];
             PlotRange -> {{x0, x1}, {y0, y1}, Automatic}, Axes -> True,
             BoxRatios -> {1,1,0.5}]
  ] ]
Listing 2. Three-dimensional interval plots.

Cuboids truncated at the box boundary have an open top which makes them easy to distinguish from the closed ones. The different-sized domains, resulting from the adaptive algorithm, are clearly visible.



All values in the following picture are finite, but along the line [Graphics:../Images/index_gr_186.gif] the cuboids extend from [Graphics:../Images/index_gr_187.gif] to [Graphics:../Images/index_gr_188.gif] even for very fine subdivisions.



This investigation is continued in the next issue of The Mathematica Journal, when we will examine the applications of interval arithmetic to the global minimization problem.

Converted by Mathematica      October 15, 1999 [Prev Page][Next Page]