4.3 3D Clipping

An unexpected issue arose when some plots were rescaled to emphasize interesting features. We found that most of the packages we used clipped the surfaces in an unsatisfactory manner. Some packages simply reset values above a certain height to the same constant, producing the shelf effect illustrated in the plot of Airy function $ \vert$Bi$ '(z)\vert$ shown in the first graph in Figure 5 and also seen in Thompson [9]. Others suppress the plotting of points where the function value is greater than a specified number, but this may produce plots with jagged edges that are equally misleading.

Figure 5: Unclipped and clipped graphs.
\includegraphics[width=3.0in]{bip0shelf3} \includegraphics[width=3.0in]{bip0_2}

Another problem is the extraction of the clipped data and its translation to a format we can use. In at least one package, we discovered that although the clipped surface looked fine on the screen, the output of the plotted data included the entire surface instead of the clipped surface.

We have been unable to find a package that meets all of our needs. Therefore, we are doing some work in developing our own techniques. We created the smoothly clipped second graph in Figure 5 by using techniques from the field of mesh generation. First, we selected the height at which we wanted to clip the function, $ Z=5$. We then used the $ Z=5$ contour curve of the function to construct a boundary for our domain. A boundary fitted mesh was placed on the domain as shown in Figure 6. By computing the Airy function only at values on the mesh we obtained the smoothly clipped surface plot in the figure. We discovered that clipping the figure by this technique also smooths the shading, which is based on the height of the function at the grid points. This is probably because the mesh lines are close to being contour curves.

Figure 6: Contour mesh.
\includegraphics[width=3.0in]{grid}

Creating a boundary-fitted mesh based on contour information about the function is an ideal solution for many graphs, but it is clear that the mesh generation problem can become quite complicated for more complex special functions that have features such as steep gradients, zeros, or poles. For example, a contour mesh for the gamma function would be multiply-connected with several holes. We may want to look at triangulation techniques to handle more complicated domains, although doing so may also affect the way we write the cutting plane software.

Design of a Digital Mathematical Library for Science, Technology and Education
Daniel W. Lozier, Bruce R. Miller and Bonita V. Saunders
Translated by Bruce R Miller on 2000-11-08
Comments? DLMF_feedback@nist.gov
Digital Library of Mathematical Functions