Wolfram Computation Meets Knowledge

Education & Academic

Splines Come to Mathematica

One of the areas I contributed to Mathematica 7 was support for splines. The word “spline” originated from the term used by ship builders referring to thin wood pieces. Over the last 40 years, splines have become very popular in computer graphics, computer animation and computer-aided design fields. From containers for household goods to state-of-the-art airplanes, it is hard to find any industrial product without spline surfaces. Also, they are widely used in other mathematical studies, such as interpolation and approximation. Through its integration of numerics, symbolics and graphics, Mathematica has the opportunity to go much further with splines than has ever been possible before. Mathematica has had basic spline packages for a long time. But in Mathematica 7 we decided to make highly general spline support a core feature of the system. Splines give another way to represent classes of functions. For decades, mathematicians had been using polynomials for numerical analysis. In the early 20th century, with advances in approximation theory, spline functions were beginning to emerge. The basic idea is simple. In essence, they consist of piecewise polynomials with local supports. Since Version 5.1, Mathematica has offered general support for piecewise functions, both numerically and symbolically. In Mathematica 7, the B-spline functions can be expanded using PiecewiseExpand. For example, a uniform cubic B-spline basis function can be expanded to the following.
Announcements & Events

Quick-Starting Mathematica with Palettes

I have taught collegiate mathematics for more than 20 years and have used Mathematica for 15 or so of these years to explore, learn and teach. For the last eight years Mathematica has been my primary tool to write all of my exams, handouts, letters, reports, papers, presentations and even a complete electronic textbook. New features introduced recently have been revolutionary in the teaching and learning environment and make possible the creation of materials that integrate text, typeset mathematics and interactive figures, which can be created efficiently and used effectively in ways not possible with other software tools. For faculty and students to benefit from using Mathematica in the teaching and learning process, they must be able to use Mathematica sufficiently well to remain focused on course concepts and not become frustrated by the technology. Without question, the main challenge I face teaching new users how to use Mathematica is helping them master the task of creating syntactically correct commands, followed closely by the challenge of teaching how to use Mathematica to write rich documents that combine text, typeset mathematics and figures. When the use of technology gets in the way of the teaching, learning and writing about content, which should remain the focus of academic learning, then all involved in the teaching and learning process experience frustration! If enough example commands are provided, if the ways of Mathematica are carefully explained, and if patient help is readily available, then some new users are able to work their way up the learning curve and reach a point where they can focus on the subject matter and are able to comfortably use Mathematica to explore, learn, teach and write about the concepts. Members of this group are often able to independently deepen their understanding and use of Mathematica by relying on the Wolfram Mathematica Documentation Center and other resources; but not enough new users reach this level of Mathematica knowledge and thus do not experience firsthand the marvelous capabilities of Mathematica to explore, investigate, learn, teach and write about interesting ideas!
Computation & Analysis

Visualizing Weather Patterns in Mathematica 7

Weather visualizations are very interesting—there are television channels that thrive by showing nothing else. Online, there are several sources for specific maps of current weather conditions. Generally these are produced and maintained by government agencies or other large organizations. But with Mathematica 7, you can easily produce completely customizable weather visualizations on your own computer. As usual, this is made possible by Mathematica’s tight integration of several areas of functionality. Two new features that enable this particular application are powerful new vector visualization functions and built-in weather data. Vector visualization has been present in Mathematica since Version 2. In Mathematica 7 it has been dramatically improved, adding modern techniques in vector data visualization and new algorithms developed at Wolfram Research. Traditional arrow-based vector plots, new methods based on automatic streamline placement, support for vector glyphs and high-resolution images produced using line integral convolutions are all now supported.
Computation & Analysis

Mathematica for Web Analytics

Recent versions of Mathematica introduced an innovative way to interact with data. Computable data functions, such as CountryData and WeatherData, provide programmatic access to curated data in a form ready for computation. The idea of computable data has been so useful in Mathematica at large that we’ve been using it internally as well. We’ve packaged some of our internal data as in-house computable data functions, so that all of our colleagues can bring a quantitative edge to their work. I work on one such function: WebsiteData. We host several popular websites at Wolfram Research, so we collect a large volume of web server log data. WebsiteData provides access to our corpus of logs, which we can use to study how visitors interact with our websites. Here’s an example of WebsiteData in action. Let’s find the most popular demonstration from the Wolfram Demonstrations Project this past month: Whenever a visitor surfs to one of our webpages, our webservers (like all webservers) record the page requested, the time of the request, the URL of the page that had linked to our webpage (we call that the referrer) and the value of the visiter’s browser cookie and other incidentals. We’ve built up a rich interface in WebsiteData to provide statistics about these fundamental events aggregated in a variety of ways.
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.