1

Web-Based 3D Visualization in a Digital Library of 

Mathematical Functions 

Qiming Wang, Bonita Saunders 

National Institute of Standards and Technology 

qiming.wang@nist.gov, bonita.saunders@nist.gov

Abstract 

The National Institute of Standards and Technology (NIST) is 

developing a digital library of mathematical functions to replace 

the widely used National Bureau of Standards Handbook of 

Mathematical Functions [Abramowitz and Stegun 1964]. The 

NIST Digital Library of Mathematical Functions (DLMF) will 

provide a wide range of information about high level functions for 

scientific, technical and educational users in the mathematical and 

physical sciences. Clear, concise 3D visualizations that allow 

users to examine poles, zeros, branch cuts and other key features 

of complicated functions will be an integral part of the DLMF. 

Specially designed controls will enable users to move a cutting 

plane through the function surface, select the surface color 

mapping, choose the axis style, or transform the surface plot into a 

density plot. To date, Virtual Reality Modeling Language and 

Extensible 3D (VRML/X3D) standards have been used to 

implement these capabilities in more than one hundred 3D 

visualizations for the DLMF. We discuss the development of 

these visualizations, focusing on the design and implementation of 

the VRML code, and show several examples. 

Keywords: virtual reality modeling language, VRML, extensible 

3D, X3D, digital library, 3D visualization, special functions 

1. Introduction 

Fundamentally unchanged since its initial publication in 1964, the 

National Bureau of Standards (NBS) Handbook of Mathematical 

Functions [Abramowitz and Stegun 1964] continues to be a 

popular resource in the mathematical and scientific community. 

Consequently, the National Institute of Standards and Technology 

(NIST), the successor organization to NBS, has decided to update 

the handbook, publishing it on the web as the Digital Library of 

Mathematical Functions (DLMF) [Lozier 2002]. The contents of 

the DLMF, also being published in hardcopy format, will include 

mathematical formulas, references, methods of computation, 

graphs, and links to software for more than 40 different functions. 

The web site will feature interactive navigation, a mathematical 

equation search, and dynamic interactive graphics. It is slated for 

completion in 2005, but a mockup version with limited 

capabilities can be found at http://dlmf.nist.gov . 

High level, or special, mathematical functions such as the Bessel 

functions, gamma and beta functions, hypergeometric functions 

and others are important for solving many problems in the 

mathematical and physical sciences. The graphs of many of these 

functions exhibit zeros, poles, branch cuts and other singularities 

that can be better understood if the function surface can be 

manipulated to show these features more clearly. A digital 

library offers a unique opportunity to create cutting-edge 3D 

visualizations that not only help scientists and other technical 

users, but also make the library more accessible to educators, 

students and others interested in an introduction to the field of 

special functions. 

After investigating web-based 3D graphics file formats, we 

selected the Virtual Reality Modeling Language (VRML) to 

create our visualizations. VRML is a standard 3D file format for 

which browsers and plug-ins are publicly available on the 

Internet, and its functionalities satisfy our web-based visualization 

requirements. The emerging XML based standard, X3D, is the 

successor to VRML and will support all VRML functions. We 

have successfully translated and tested several of our VRML files 

to confirm that conversion to X3D format is both feasible and 

practical. 

The DLMF web site will be organized into chapters, and most 

chapters will have a section called “Graphs and Visualizations” 

where links to 2D and 3D figures can be found. Each 3D image 

will be associated with a link to a VRML/X3D file that the user 

can manipulate interactively. 

Although we continue to address such issues as data accuracy, the 

clipping of surfaces falling outside a specified range, and the 

generation of computational meshes [Saunders and Wang 2000] 

to capture significant features of a function, this paper assumes 

these issues have been resolved and focuses primarily on the 

creation of the VRML files. In particular, we describe the 

development and implementation of MathViewer, a VRML 

prototype, or object-defining and extensibility routine, which 

controls the interactive manipulation of the 3D surfaces. In 

Section 2 we discuss the user capabilities provided by 

MathViewer. Section 3 describes the high and low-level VRML 

prototypes that make up MathViewer, Section 4 shows still 

images of visualizations created for the DLMF, Section 5 

discusses some initial results using an X3D implementation of 

MathViewer, and finally, Section 6 offers some conclusions and 

suggestions for enhancements. 

2. MathViewer 

While customary VRML browser controls such as rotate, zoom, 

and pan permit a user to examine a 3D display from an arbitrary 

direction, we also wanted to provide options for more extensive 

manipulation of function surfaces. Discussions with DLMF 

editors and authors led to several suggestions concerning the types 

of interaction users might desire. We developed the VRML 

prototype MathViewer to implement several of these capabilities 

discussed below. 
2

MathViewer generates a display consisting of a 3D function 

surface with coordinate axes, and a main control panel with five 

buttons. The first four buttons generate subordinate control 

displays that provide cutting plane control, axes and label style 

control, scaling control, and color map control. The fifth button, 

“none”, deletes the subordinate display. Figure 1 shows the 

modulus of the gamma function in the CosmoPlayer VRML 

browser. The dashboard display is specific to CosmoPlayer. 

Figure 1 Gamma function display in CosmoPlayer. 

(1) Cutting Plane Control 

Cutting plane control allows the user to examine the intersection 

of a plane with a function surface as the plane moves through the 

surface. The plane can be parallel to coordinate axis x, y, or z. The 

intersection curves are projected onto opposite faces of the 

bounding box, and displayed in a separate pop up window. The 

user moves the cutting plane by selecting VCR-like buttons to 

play, stop, reverse, rewind, or fast-forward, or uses the slider bar 

to move the plane to a specific position and clicks “go” to display 

the intersection. The calculation of the intersection curves occurs 

in real time. 

 Figure 2 shows a cutting plane moving in the z, or vertical axis, 

direction for the Jacobian elliptic function, dn(x, κ). The cutting 

plane control panel is below the function on the left, and on the 

bottom right is the pop up window showing the intersection 

curves. The axis labels, “x”, “n”, “z”, displayed on the control 

panel and pop up window correspond to the axes shown in the 

surface figure. When the user moves the cutting plane with the 

“play” button, the location of the cutting plane is displayed with 

the pop up window showing the curves of intersection. When the 

cutting plane is moved with the slider bar, the location of the 

cutting plane appears under the slider bar in the control panel. 

When the “go” button is hit, the intersection curves and cutting 

plane location appear in the pop up window. 

 

Figure 2 Jacobian elliptic function z = dn(x, κ), for κ n e − = 1− , 

n=0 to 20 and real argument, x, -5π ≤ x ≤5π with cutting plane at 

z=0.58372. 

(2) Axis and Label Control 

Using the axis and label control panel, a user can select the style 

preferred. This may be convenient if the user wishes to do a 

screen capture of the display for use in a publication, or 

elsewhere. Figure 3 shows the four axis styles that are available: 

front, back, triad, and no axes. Both the front and back styles 

allow the user to enclose the surface with a bounding box. 

 Front Style Back Style

 Triad No Axes 

 Figure 3 Axis and Labeling Styles 

Expressions for mathematical functions often contain special 

symbols or Greek letters which are not supported by most VRML 
3

browsers. When such characters are needed we generate image 

files using other software and imbed them into the VRML file. 

Examples of this can be seen in some of the axis labels for the 

surfaces shown in Figure 13. 

(3) Color Map Control 

Visualizations in the DLMF represent either real-valued or 

complex-valued functions of the form, z=f(x, y). For real valued 

functions only a height based color map, where height = z, is 

provided. For complex-valued functions, the user has the option 

of using a height based color mapping where height = |z|, or a 

mapping based on the phase, or argument, of z. The height based 

mapping is determined by the following formula where Color is 

RGB color (red, green blue) and value is the height scaled to lie 

between 0 and 1, inclusive: 

 Color = (0, value/0.25, 1), if 0≤ value < 0.25, 

 Color = (0, 1, (0.5-value)/0.25), if 0.25≤ value < 0.5, 

 Color = ((value-0.5)/0.25), 1, 0), if 0.5≤ value < 0.75, 

 Color = (1, (1-value)/0.25, 0), if 0.75≤ value ≤ 1. 

Currently the user is given two options for the phase based 

mapping: four color map or continuous spectrum. In the four color 

based method, the colors blue, green, red, and yellow are used to 

indicate whether the phase of z lies in the first, second, third, or

fourth quadrant, respectively. The continuous spectrum based 

method maps the phase information to the color so that 0, π/2, π, 

and 3π/2 correspond to red, yellow, cyan, and blue with a smooth 

transition between the colors. Figures 1-3 show height based color 

mappings. The surfaces in Figures 4 and 5 illustrate the four color 

and continuous spectrum based mappings. 

 

Figure 4 Modulus of complex sine function with four color map.