Psellos
Contemporary Development With Functional Programming

OCaml iOS Simulator App “Voronoi” Updated for Lion

May 29, 2012

I updated the OCaml iOS Simulator example app, Voronoi, to build and run under Lion with the latest Xcode. It lets you draw fantastic-looking Voronoi diagrams by placing dots on the screen. It also shows how to run OCaml on iOS, with no need for an iOS device. There’s a binary version that you can run in the simulator just by clicking on it. Or you can download sources and build it yourself.

iOS Simulator running Voronoi app

The accompanying Voronoi screenshot shows what it looks like—but imagine that you can move the dots or add new ones while the shapes and colors adjust hypnotically.

Whenever I run this app I get excited by what I can come up with in just a few minutes, and end up making a big gallery of screenshots. There are a few more in the writeup, but I have many more if anybody is interested. Or you could make your own screenshots and send them to me.

The update makes no changes to the OCaml and ObjC code—Voronoi only uses parts of iOS that haven’t changed since iOS 3.1. However, I built a launcher app that lets you run Voronoi in the iOS Simulator with just a few clicks (no command line). I also repackaged the sources so you can build and run in the simulator under Xcode with just a few clicks.

An advantage of using Xcode is that it’s the supported way of running apps in the simulator. For those who actually like to work from the command line (as I often do) the instructions also show how to build and run the app that way.

As always, the previous version of Voronoi is still available in the OCaml Programming Archives.

Posted by: Jeffrey

Comments

blog comments powered by Disqus