WOLFRAM

Computation & Analysis

Visualizing the Recent Yellowstone Earthquakes

A couple of days ago I read about an unusual “swarm” of earthquakes at Yellowstone National Park. After reading up on this topic a bit (and determining that my home state of Illinois would not be obliterated immediately by a supervolcano outburst), I decided to make an animation about it in Mathematica. First I searched for “yellowstone map sdts” on Google and downloaded this geological map of Yellowstone from the U.S. Geological Survey website. After uncompressing the zip file, I simply pointed Import to the top directory containing the SDTS files: The resulting graphic contains a lot of distracting detail, so I decided to extract just the polygons and give them a muted gray background color. What remains are the outline polygons for each geological layer as observed by the USGS. Also, I set the image size to 1280x720, which makes it suitable for a 720p high-definition video stream:
Design & Visualization

Fun with Line Art

I’m constantly amazed by the wide variety of tasks people accomplish with Mathematica, everything from serious scientific research and development to fun games and puzzles. This one is more on the fun side. A few days ago I was trying to convert a raster image to a vector image. I remembered seeing some online service to do this in the past and I was trying to dig up the URL. In the back of my mind I thought I could probably do this with Mathematica, but it wasn’t immediately clear how. I spent a minute or two contemplating various algorithms one could use before realizing Mathematica already has a built-in visualization function that could do most of the work for me: ListContourPlot. This function was meant to handle elevation-like data, but a two-dimensional list of grayscale values is essentially the same thing. The first step is to get a suitable raster image into Mathematica 7. This is easy enough: just drag a JPEG file into the notebook window and assign it to a variable. Here is a picture of my handlebars after a muddy bike race.
Education & Academic

Mathematica 7, Johannes Kepler and Transcendental Roots

Everyone who has been through high-school mathematics knows about polynomial equations. But what about equations involving other functions? Say equations like x == 1 - Sin[x]. These are transcendental equations, and they show up in a zillion different mathematical application areas. But they’re rarely talked about—perhaps because in some sense they’ve been an embarrassment: mathematics has had very little to say about them. Polynomial equations and the algebraic numbers that represent their solutions have been one of the great success stories of pure mathematics. Over the past half millennium, a huge mathematical structure has been built on polynomial equations. But almost nothing has been done with transcendental equations. It’s not that they’re not important. In fact, what many people consider the very first computer—made of wood by Wilhelm Schickard in 1623—was built specifically to help in getting solutions to equations of the form x == 1 - e Sin[x]. Johannes Kepler was in the process of constructing his Rudolphine astronomical tables—and his killer technology for finding the longitude of a planet at a given time required solving what’s now called Kepler’s equation: essentially the transcendental equation x == 1 - e Sin[x]. With considerable effort, and probably computer support, Kepler made a table of solutions to this equation:
Products

The Wolfram Demonstrations Project Goes 7

Just a couple of weeks ago we released Mathematica 7. This week we’ve made the Wolfram Demonstrations Project live with Mathematica 7. All the 4270 Demonstrations on the site run with Mathematica 7 (yes, we tested every single one of them, partly automatically, partly by hand). And we added 147 new Demonstrations that specifically make use of Mathematica 7’s features. Most of those Demonstrations were created internally within Wolfram Research, in a small frenzy of activity right around the actual release of Mathematica 7. I was involved in organizing this Demonstrations-fest. It’s very impressive how quickly it’s possible to create so much high-quality material with Mathematica. Of course, it helped that we were able to work directly with the key developers of much of Mathematica 7’s functionality—so people were often creating Demonstrations based on the very features they had implemented in the system. The new image processing system in Mathematica 7 was a particularly fertile source of Demonstrations. Charting, splines and vector visualization are other areas that have spawned all sorts of interesting Demonstrations. Here are a few of my personal favorites:
Design & Visualization

The Incredible Convenience of Mathematica Image Processing

It’s been possible since Version 6 of Mathematica to embed images directly into lines of code, allowing such stupid code tricks as expanding a polynomial of plots. But is this really good for anything? As with many extremely nifty technologies, this feature of Mathematica had to wait a while before the killer app for it was discovered. And that killer app is image processing. Mathematica 7 adds a suite of image processing functions from trivial to highly sophisticated. To apply them to images, you don’t need to use any form of import command or file name references. Just type the command you want to use, then drag and drop the image from your desktop or browser right into the input line.
Announcements & Events

Surprise! Mathematica 7.0 Released Today!

In the middle of last year, we finished our decade-long project to reinvent Mathematica, and we released Mathematica 6. We introduced a great many highly visible innovations in Mathematica 6—like dynamic interactivity and computable data. But we were also building a quite unprecedented platform for developing software. And even long before Mathematica 6 was released, we […]

Computation & Analysis

Visualizing Integrals

Calculus II is one of my favorite classes to teach, and the course I’ve probably taught more than any other. One reason for its special place in my heart is that it begins on the first day of class with a straightforward, easily stated, yet mathematically rich question: what is the area of a curved region? Triangles and rectangles—figures with straight sides—have simple area formulas whose derivation is clear. More complicated polygons can be carved up into pieces that are triangles and rectangles. But how does one go about finding the area of a blob?

After simplifying the blob to be a rectangle whose top side has been replaced with a curve, the stage is set for one of the classic constructions in calculus. The area of our simplified blob, reinterpreted as the area under the graph of a function is approximated using a series of rectangles. The approximation is obtained by partitioning the x axis, thus slicing the region into narrow strips, then approximating each strip with a rectangle and summing all the resulting approximations to produce a Riemann sum. Taking a limit of this process by using more and narrower rectangles produces the Riemann integral that forms the centerpiece of Calculus II. Several Demonstrations from the Wolfram Demonstrations Project, including "Riemann Sums" by Ed Pegg Jr, "Common Methods of Estimating the Area under a Curve" by Scott Liao and "Riemann Sums: A Simple Illustration" by Phil Ramsden show that this construction and images like the one below from "Riemann Sums" are part of the iconography of calculus.
Best of Blog

Stock Market Returns by Presidential Party

The New York Times recently published an “Op-Chart” by Tommy McCall on its Opinion page showing what your returns would have been had you started with $10,000 in 1929 and invested it in the stock market, but only during the administrations of either Democratic or Republican presidents. His calculations showed that if you had invested only during Republican administrations you would now have $11,733 while if you had invested only during Democratic administrations you would now have $300,671. Twenty-five times as much!

That’s a pretty dramatic difference, but does it stand up to a closer look? Is it even mathematically plausible that you could have essentially no return on your investment at all over nearly 80 years, just by choosing to invest only during Republican administrations?

To answer these questions, I of course turned to Mathematica.

And the answer is that yes, it is mathematically plausible, using the assumptions made by McCall. My analysis using historical Dow Jones Industrial Average data available in Mathematica’s FinancialData function roughly matches the figures in the Times, which used Standard & Poor’s data. (I used the Dow because it’s more convenient, not because I think it’s a better measure.)

But the fact that they are correct doesn’t mean the figures are even remotely meaningful. Here are some problems with the New York Times’ Op-Chart:
Announcements & Events

Russell Towle: 1949–2008

A few times a year they would arrive. Email dispatches from an adventurous explorer in the world of geometry. Sometimes with subject lines like “Phenomenal discoveries!!!” Usually with images attached. And stories of how Russell Towle had just used Mathematica to discover yet another strange and wonderful geometrical object. Then, this August, another email arrived, […]