Wolfram Computation Meets Knowledge

Date Archive: 2011 December

Announcements & Events

Two Hundred Thousand Snowflake Greetings to You and Yours

Take Stephen Wolfram's theory of the universe, add a dash of symmetry, and what do you get? Snowflakes. Cellular automata—the basis of Stephen's theory—typically operate on rectlinear grids. But with suitable automata rules and a simple geometric transformation, you can achieve patterns with six-fold dihedral symmetry, the symmetry of snowflakes. My colleague Ed Pegg Jr. showed that idea nicely in his Demonstration "Snowflake-Like Patterns”. I started with his Demonstration; added some ideas from Matthew Szudzik's related Demonstration, "Snowflake Growth”; and fine-tuned the rendering to recall Bentley's classic snowflake photos, arriving at this interactive snowflake generator.
Announcements & Events

Mathematica 8 Year in Review

Mathematica 8 introduced powerful new advances in technical computing. Among them: free-form input and Wolfram|Alpha integration; fully integrated, specialist technical functionality in a number of application areas; tools to develop faster and more powerful applications; and the Computable Document Format (CDF). At the Wolfram Technology Conference 2011, the Wolfram directors who led the development of these new capabilities presented a Mathematica 8 Year in Review:

Mathematica Q&A Series: Converting to Conventional Mathematical Typesetting

Got questions about Mathematica? The Wolfram Blog has answers! We'll regularly answer selected questions from users around the web. You can submit your question directly to the Q&A Team. This week's question comes from Jee: How can I transform the output of partial differentiation such as f(1, 0)[x, y] to the mathematical form ? Read below or watch this screencast for the answer (we recommend viewing it in full-screen mode): We will assume that the reader is already familiar with the basics of differentiation in Mathematica. To quickly catch up with the topic, one should read the recent Q&A blog post "Three Functions for Computing Derivatives”.
Announcements & Events

Mathematica as a Tool in the Sexy World of ebooks

Touch Press, the digital publishing company founded by Stephen Wolfram, Theodore Gray, and Max Whitby, continues to push the boundaries of what's possible in the world of ebooks. A big part of the company's success is due to its use of Mathematica. Touch Press developers have used Mathematica in the production of nearly all of its highly popular titles, including The Elements, Solar System, and its latest title, March of the Dinosaurs. At the Wolfram Technology Conference 2011, Gray gave an inside look at the Mathematica tools used in the company's current and future ebooks and described why Mathematica makes Touch Press perfectly positioned to redefine the future of publishing.
Best of Blog

10 Tips for Writing Fast Mathematica Code

When people tell me that Mathematica isn't fast enough, I usually ask to see the offending code and often find that the problem isn't a lack in Mathematica's performance, but sub-optimal use of Mathematica. I thought I would share the list of things that I look for first when trying to optimize Mathematica code. 1. Use floating-point numbers if you can, and use them early. Of the most common issues that I see when I review slow code is that the programmer has inadvertently asked Mathematica to do things more carefully than needed. Unnecessary use of exact arithmetic is the most common case. In most numerical software, there is no such thing as exact arithmetic. 1/3 is the same thing as 0.33333333333333. That difference can be pretty important when you hit nasty, numerically unstable problems, but in the majority of tasks, floating-point numbers are good enough and, importantly, much faster. In Mathematica any number with a decimal point and less than 16 digits of input is automatically treated as a machine float, so always use the decimal point if you want speed ahead of accuracy (e.g. enter a third as 1./3.). Here is a simple example where working with floating-point numbers is nearly 50.6 times faster than doing the computation exactly and then converting the result to a decimal afterward. And in this case it gets the same result.
Announcements & Events

The 2011 Mathematica One-Liner Competition

The Mathematica One-Liner Competition at last year's Wolfram Technology Conference was such a popular success that we did it again this year. As readers of this blog may recall, last year's winning entry, submitted by Stephan Leibbrandt, was a complete, animated simulation of particles coalescing under gravitational and repulsive forces. This year's winner takes advantage of the integration of Mathematica and Wolfram|Alpha that debuted in Version 8. The rules were the same this year as last: produce the most stunning output you can with 140 or fewer input characters, typeset 2D expressions are allowed, and white space doesn't count. The entries were once again all over the place, from anagrams and fractals to abstract graphics and astronomical charts. Eighteen participants submitted 33 one-liner entries. Five of those merited Honorable Mentions. One got a Dishonorable Mention. And of course, prizes went to Third, Second, First-and-a-Half, and First Places.