WOLFRAM

Search Results for '12 - 12 - '

Design & Visualization

The Battle of the Marlborough Maze at Blenheim Palace Continues

Regular readers of the Wolfram Blog will have seen that the item that I wrote on solving mazes using morphological image processing was thoroughly beaten by the much smarter and better read, Daniel Lichtblau from our Scientific Information Group in his post "Navigating the Blenheim Maze”. Always up for a challenge (and feeling a little guilty about the rather hacky and lazy way I tried to deal with loops and multiple paths the first time), I am back for another go. My first approach with any new problem is to think about the nearest available Mathematica command. In the new Mathematica 8 features is a graph theory command FindShortestPath. That certainly sounds promising. Mixing image processing and graph theory may sound complicated, but one of the central strengths of Mathematica's integrated all-in-one design is that different functionality works together, and in this case it proves to be quite easy.
Computation & Analysis

The Mathematica One-Liner Competition

Your assignment: Write a simulation of spherical particles coalescing under gravitational attraction. Limit the approach distance by a secondary repulsive force that acts over short distances. Produce an animation of the dynamic system starting with 15 particles in randomized positions. Formulate your solution in 140 characters or less. Sound challenging? A 138-character solution was Stephan Leibbrandt's winning entry in the Mathematica One-Liner Competition that was a part of this year's Wolfram Technology Conference.
Computation & Analysis

The Legacy of TRON

Editorial note: A future post will explore some of the contributions to the visual arts and media facilitated by Mathematica. The year 1982 saw a lot of important movies: Blade Runner, E.T.: The Extra-Terrestrial, Poltergeist, Star Trek II: The Wrath of Khan, The Thing, Mad Max 2: The Road Warrior, Pink Floyd The Wall, First Blood, Conan the Barbarian, Fast Times at Ridgemont High, The Dark Crystal, and TRON. I used Mathematica functionality to turn the TRON logo into something you can manipulate. You can download my notebook to play with the logo. (Mathematica Home Edition could be used to do this as well.)
Best of Blog

Automatic Physical Units in Mathematica

I just published a Mathematica package that provides an alternative, richer implementation of units and dimensional analysis than the built-in units package. You can get it here. Aside from being a really nice extension to Mathematica, it is also an interesting case study in adding a custom data "type" to Mathematica and extending the knowledge of the built-in functions to handle the new "type". First I have to explain the point by answering the question, "What's wrong with the built-in units package?" Well, there is nothing actually wrong with it, it just doesn't apply Mathematica's automation principles. It can convert between several hundred units and warn if a requested conversion is dimensionally inconsistent. But give it an input like... and it does nothing with it until you specify that you want the result in a specific unit. The core reason is that it doesn't teach the system, as a whole, anything about units, or even that the symbol "Meter" is any different than the symbol "x". All of the knowledge about units and Meter in particular is contained in the Convert command.
Design & Visualization

Navigating the Blenheim Maze

I read Jon McLoone's recent "aMazeing Image Processing in Mathematica" post with some interest. It showed how to import an image of a maze, and then use image processing functions in Mathematica (some new to Version 8) to draw paths through the maze. What fun! I then observed, to my dismay, that there was no way to determine a "good" path. Frankly, I was disappointed. I decided that there must be ways to do this in Mathematica. One approach would involve forming a graph. We would have vertices at points where the maze path forks, and we would make weighted edges from approximated distances between these vertices. New functionality in Mathematica supports these graph methods. Unfortunately I am not yet familiar with it.
Education & Academic

How to Win at Coin Flipping

Let's flip a coin, over and over. Beforehand, the players each pick a sequence of flips. The sequence that occurs first wins. With HH vs. TH, HH will win if the first two flips are HH and will lose if any of those flips are tails. HH vs. TH has a 1/4 vs. 3/4 possibility of winning. Phrased a different way: Suppose I offer a bet on a series of coin flips. One of these bets would be bad for you. Which one? The odds of the event occurring are given at the end. (The second bet is the bad bet to take.) HTT appears before TTT. If it does, I give you $1. If not, you give me $4. (7/8) HHT appears before TTT. If it does, I give you $1. If not, you give me $3. (7/10) THH appears before HHT. If it does, I give you $1. If not, you give me $2. (3/4) HTH appears before THH. If it does, I give you $1. If not, you give me $1. (1/2) This is the strange world of Penney's game. Here is a table of odds and facts for various 3-flip games. Calculating these odds can be both tedious and mathematically demanding—a natural job for Mathematica or Mathematica Home Edition.
Announcements & Events

Programming with Natural Language Is Actually Going to Work

I love computer languages. In fact, I’ve spent roughly half my life nurturing one particular very rich computer language: Mathematica. But do we really need computer languages to tell our computers what to do? Why can’t we just use natural human languages, like English, instead? If you’d asked me a few years ago, I would […]

Announcements & Events

The Free-Form Linguistics Revolution in Mathematica

With the release of Mathematica 8 today, the single most dramatic change is that you don’t have to communicate with Mathematica in the Mathematica language any more: you can just use free-form English instead. Wolfram|Alpha has pioneered the concept of specifying computations with free-form linguistic input. And with Mathematica 8, the powerful methods of Wolfram|Alpha […]

Design & Visualization

How to Make a Webcam Intruder Alarm with Mathematica

Ever since I wrote the "Doing Spy Stuff with Mathematica" blog post, I have had a feeling that I am being watched. Time to build some office security using Mathematica Home Edition! First, I am going to make use of an imminent new Mathematica command CurrentImage, which will import a real-time image from a video device. Let's get some test images using the webcam on my laptop.