September 4, 2014 — Jon McLoone, International Business & Strategic Development

I first came across the knight’s tour problem in the early ’80s when a performer on the BBC’s The Paul Daniels Magic Show demonstrated that he could find a route for a knight to visit every square on the chess board, once and only once, from a random start point chosen by the audience. Of course, the act was mostly showmanship, but it was a few years before I realized that he had simply memorized a closed (or reentrant) tour (one that ended back where he started), so whatever the audience chose, he could continue the same sequence from that point.

In college a few years later, I spent some hours trying, and failing, to find any knight’s tour, using pencil and paper in various systematic and haphazard ways. And for no particular reason, this memory came to me while I was driving to work today, along with the realization that the problem can be reduced to finding a Hamiltonian cycle—a closed path that visits every vertex—of the graph of possible knight moves. Something that is easy to do in Mathematica. Here is how.

Read More »


August 14, 2014 — Tom Sherlock, User Interface Group

The planet Mars comes into opposition, the point closest to the Earth, about every 780 days, or a bit over two years. The Martian opposition this year was on April 9. This past May, on a rare clear, warm night, I attempted to capture some images of the red planet. Unfortunately once I had my telescope set up, Mars had passed behind a large tree, so the images I captured were distorted by tree branches. Nevertheless, I did manage to capture a set of frames, and hoped that image processing with Mathematica could produce something usable.

Read More »


May 30, 2014 — Wolfram Blog

Donald Barnhart is a self-proclaimed mad optical scientist and independent business owner. He’s been developing optical design and analysis software in Mathematica since 1991, he’s the creator of the popular Optica software package, and he’s the developer of the first successful high-resolution holographic instrument that measures three-dimensional velocity fields in fluids.

Now Barnhart has another invention to add to his list of accomplishments: a totally new kind of photo album called the SlideOScope.

Read More »


August 15, 2013 — Michael Trott, Chief Scientist

This blog post is the continuation of my last two posts (1, 2) about formulas for curves. So far, we have discussed how to make plane curves that are sketches of animals, faces, fictional characters, and more. In this post, we will discuss the constructions of some filled curves (laminae).

Read More »


July 19, 2013 — Michael Trott, Chief Scientist

In my last blog post, I discussed how to construct closed-form trigonometric formulas for sketches of people’s faces. Using similar techniques, Wolfram|Alpha has recently added a collection of hundreds of such closed-form curves for faces, shapes, animals, logos, and signatures.

Read More »


July 15, 2013 — Matthias Odisio, Mathematica Algorithm R&D

Or: How I Learned to Watch the Best Movies in the Best Way

I remember when I lived across the street from an art movie theater called Le Club, looking at the movie posters on my way back home was often enough to get me in the ticket line. The director or main actors would ring a bell, or a close friend had recommended the title. Sometimes the poster alone would be appealing enough to lure me in. Even today there are still occasions when I make decisions from limited visual information, like when flipping through movie kiosks, TV guides, or a stack of DVDs written in languages I can’t read.

So how can Mathematica help? We’ll take a look at the top 250 movies rated on IMDb. Based on their posters and genres, how can one create a program that suggests which movies to see? What is the best way to see the most popular movies in sequence?

Movies in sequence image

Read More »


May 17, 2013 — Michael Trott, Chief Scientist

Here at Wolfram Research and at Wolfram|Alpha we love mathematics and computations. Our favorite topics are algorithms, followed by formulas and equations. For instance, Mathematica can calculate millions of (more precisely, for all practical purposes, infinitely many) integrals, and Wolfram|Alpha knows hundreds of thousands of mathematical formulas (from Euler’s formula and BBP-type formulas for pi to complicated definite integrals containing sin(x)) and plenty of physics formulas (e.g from Poiseuille’s law to the classical mechanics solutions of a point particle in a rectangle to the inverse-distance potential in 4D in hyperspherical coordinates), as well as lesser-known formulas, such as formulas for the shaking frequency of a wet dog, the maximal height of a sandcastle, or the cooking time of a turkey.

Recently we added formulas for a variety of shapes and forms, and the Wolfram|Alpha Blog showed some examples of shapes that were represented through mathematical equations and inequalities. These included fictional character curves:

fictional character curves

fictional character curves

Read More »


April 29, 2013 — Piotr Wendykier, Mathematica Algorithm R&D

Professional cameras offer a resolution of 50 megapixels and more. In addition, projects like GigaPan allow one to create gigapixel panoramas with billions of pixels. How can we process these images on a desktop computer with 8 GB of RAM?

One of Mathematica 9′s new and exciting features is out-of-core image processing. What does the out-of-core term really mean? It is a way to process very large images that are too big to fit into main memory. Let’s say we have a machine with 8 GB of RAM, and let’s assume that Mathematica can use up to 7.2 GB of that memory (the remaining 0.8 GB will be used by the operating system). Freshly started, Mathematica 9 on Windows 8 takes up about 200 MB of memory, so the kernel can use about 7 GB of RAM. What is the maximal size of the image that we can load into the kernel (we don’t want to visualize it at this point)? If we assume that the image is in the RGB color space and a single byte encoding, then the following formula gives a maximal width (and height) of an image that can be loaded at once into the memory:

maxMemoryInBytes0 = 7 1024^3 ; maxWidth0 = Floor[Sqrt[maxMemoryInBytes0/3.0]]

50053

Read More »


February 14, 2013 — Giulio Alessandrini, Mathematica Algorithm R&D

Mathematica 9 has just been released with many new or enhanced capabilities for image processing. You can perform morphological operations, color manipulation, segmentation analysis, feature detection, and more, most of which can be applied to the new Image3D object as well.

A byproduct of this whole ecosystem is that now it is easier than ever to use Mathematica to create and apply effects to your images.

Defining the new image

Two Mathematica super functions that can be used to apply transformations directly to an image are ImageApply, which is a pixel operator, and ImageFilter, which considers the pixel as well as a neighborhood of pixels around it and works as a local filter.

For example, you can remove the blue channel and perform a gamma correction only on the green channel by doing the following:

myfunction[{r_, g_, b_}] := {r, g^1.5, 0} ImageApply[myfunction, image]

Image with the blue channel removed and a gamma correction only on the green channel

Read More »


January 29, 2013 — Wolfram Blog Team

With Mathematica, you can bring new ideas into focus. No one knows that better than Fritz Lebowsky. He’s a senior principal engineer who does image-quality-related algorithm development for STMicroelectronics, a global manufacturer of electronics and semiconductors with advanced image processing technologies.

Thanks to Mathematica‘s advanced programming language and computational power, Lebowsky is seeing major advancements in his image processing development work, with his latest color imaging project set to double performance while reducing cost by half.

About the development, he says, “For the very first time in my research career I could combine several simple non-linear functions/dimensions to overcome some fundamental weaknesses in today’s linear mathematics applied to image processing.”

Read More »