Mathematica for Geology


Book Review

Click here to read a review of Computational Geosciences


Click here to see a list of corrections or report an error you’ve found

Order a copy

North and South America
United Kingdom,11855,4-10007-22-26872308-0,00.html,11855,4-10007-22-26872308-0,00.html,11855,3-10007-22-26872308-0,00.htmlshapeimage_2_link_0shapeimage_2_link_1shapeimage_2_link_2

What’s Mathematica?

Mathematica is a commercially available computer program capable of symbolic and numerical math, statistics, sophisticated graphics, and more. It’s completely programmable and extensible with user-written packages for things like problems specific to the geologic sciences. I’ve used it extensively in my research, consulting, and teaching for more than 20 years.


Stereonet is my Mathematica package containing functions for lower hemisphere projections (aka stereo nets) and statistical analysis of angular orientation data. While some stereo net software places artificial limits on the kinds of plots or analyses that can be done, Stereonet takes a different approach. It’s a collection of functions that can be combined and even customized to facilitate virtually any kind of orientation analysis.

The current version of Stereonet is 0.9.1, updated in July 2013 to fix some incompatibilities that caused plotting problems with Mathematica 9.

Some of the functions in Stereonet include:

  1. Plotting of dip vectors, poles to planes, and great circles

  2. Contouring with user-specified counting circle area and interpolation order or Kamb’s method

  3. Calculation of vector means and assorted measures of dispersion and/or uncertainty for joint sets

  4. Cluster analysis for statistical delineation of joint sets

  5. Eigenvector fabric descriptors

  6. Probabilistic outlier detection and removal

  7. Generation of Fisher distributed random deviates for probabilistic simulations and hypothesis testing

  8. Calculation of linear sampling angular deviation (LSAD) for optimizing drilling directions in jointed rocks

  9. Markland plots for kinematic rock slope stability analysis

Stereonet is compatible with Mathematica 7 and later versions, and is free to use as long as it is properly attributed.

Follow the links below to download an introduction to Stereonet as a static (.pdf)  file or an executable Mathematica notebook (.nb), or the installable Mathematica file Stereonet.m.

  1. Introduction to Stereonet (.pdf file)

  2. Introduction to Stereonet (executable.nb file)

  3. Stereonet package (installable .m file)

  4. Sample data (stereodata.txt file)

The Book

Computational Geosciences with Mathematica. Hardcover, 382 pages, 297 illustrations, and CD-ROM. ISBN 3-540-40245-4. Springer, 2004.

I wrote Computational Geosciences with Mathematica to show how geologists can use this modern software to formulate, solve, and visualize a wide variety of problems and move beyond the limitations of spreadsheet programs. Its topics are based on nearly 20 years of experience as a researcher, university teacher, practicing geologist, and Mathematica user.  They include:

  1. Introduction to Mathematica

  2. Special plots of interest to geoscientists

  3. Linear and differential equation solving (symbolic and numerical)

  4. Interpolation and regression

  5. Continuous and discrete probability distributions

  6. Monte Carlo simulation

  7. Geologic surface visualization and analysis

  8. Signal and image processing

Please note that a number of minor glitches have arisen with the introduction of Mathematica 9 (the book was completed in 2003, just as Mathematica 5 was being released). My experience is that these are easy to correct if users read the diagnostic messages and make use of the built-in Mathematica help capabilities. Please let me know if you encounter any problems that aren’t easily solved.

Computational Geosciences with Mathematica was selected for the 2006 Claire P. Holdredge Award from the Association of Environmental & Engineering Geologists as “ outstanding contribution to the engineering geology profession.”


Interactive mini-app illustrating in real time the effects of changing counting window size and interpolation order on contoured plot of poles to planes, created using Stereonet functions within Mathematica.

Using Stereonet functions to contour the pole distribution, perform cluster analysis to delineate and color code 3 joint sets, and plot their mean poles.

Stereonet equal area contour plot of the LSAD to optimize drilling directions in jointed rock.

Probabilistic discrete fracture network  simulation created by using the Fisher random deviate function from Stereonet in a short Mathematica script.