# Pi Cubed for iPhone and iPod touch

Today, I'm proud to announce the release of my latest application: Pi Cubed for iPhone / iPod Touch. Pi Cubed is a visual math application built around the touchscreen of these portable devices. Rather than follow the standard design of calculators, with fixed buttons and a small LCD display, I wanted to try something new. Pi Cubed uses the full touchscreen to typeset and evaluate calculations, and it relies heavily on Core Animation to animate all of its operations.

Pi Cubed is available for $9.99 (or the local equivalent) on the iTunes App Store.

### What it is

It's easier to understand what Pi Cubed is if you see it in action, so I suggest you watch the overview video on the main page for the application. In a nutshell, Pi Cubed lets you enter calculations using a variety of mathematical operations, while typesetting and evaluating these calculations in realtime. This is enabled by a touch-oriented menu system, and assisted by the use of common multitouch gestures (pinch-zooming of equations, and finger swipes for panning across results).

In addition to the base calculation support, Pi Cubed ships with over 150 preprogrammed equations. You can load one of these equations at any time and start entering values for the variables. Tapping on a variable brings up a text label that describes what it is, a feature that is great for reference or educational purposes.

Pi Cubed is currently available on the iTunes App Store for $9.99. Unlike Molecules, I've decided to charge for Pi Cubed. I'm not doing this to get rich on the iPhone gold rush and quit my day job, but merely to see if I can build a sustainable business on the side.

I'd also like to announce that I have elected to donate 10% of my net proceeds from the sale of Pi Cubed (after Apple's cut) to the Child's Play charity. Child's Play is an outstanding organization, founded by Jerry Holkins and Mike Krahulik of the Penny Arcade webcomic with the goal of providing video games and toys to children's hospitals around the world. I am a gamer and have been a fan of Child's Play for years, but always felt that there was more I could be doing to help. Even if Pi Cubed is not for you, I encourage you to keep Child's Play in mind, especially during their end-of-year fundraising drive.

### Why I wrote it

I started kicking around ideas for Pi Cubed soon after the launch of the App Store, when the first solid download statistics started coming in for Molecules. I was stunned at the interest level for what I considered to be a niche application which would only appeal to a small subset of students and scientists. Instead, Molecules was the #8 most downloaded free utility of 2008 in the App Store, with over 360,000 downloads to date.

It was also about that time that I'd started playing around with all of the calculator applications available for the iPhone. Despite many of them having impressive lists of features, I found myself going back to using my TI-85 every time. When I work out my math, I do it visually. I also like the ability to edit the calculations I've entered. Traditional calculators with single-value displays don't satisfy these needs. There are a couple of applications that let you enter full expressions, but they rely on fixed buttons which either take up much of the screen or were too small to hit reliably. Additionally, all of them used plain-text representations of the equations you were entering, rather than the nicely laid-out calculations we're used to working with on paper.

I decided that I wanted to try making mathematical expressions the central element of the interface, and gear everything to be easy to touch. I had also done some work with Core Animation, and wanted to get a little deeper into the framework. After some experimentation, I decided this could actually work. Six months later, this is what I was able to produce.

### What's in store

Pi Cubed in its current state is a powerful application, but I have a lot more planned for its future. The most significant addition that I am currently working on is unit support for numbers, with conversions occurring transparently behind the scenes. This will greatly enhance the built-in equations, particularly for engineers and students who deal in all sorts of units for physical quantities. Other planned additions include: even more equations for the built-in library, matrix math, MathML export, user-created equations with variables, and a Mac desktop client.

Unfortunately, my work on Pi Cubed has drawn me away from Molecules over the last six months. I will now be able to get back to work on that application, with another update hopefully happening soon. For those of you using Molecules' code as a point of reference, I hope to clean that up and improve the documentation throughout.

## Comments

Does your app allow mw to input this type of formula:

Paltitude=Psea * exp ((-932.92 * h) / (.00000000000000000000000556 * T ))

which evaluates to 0 for:

h=6940

Psea=29.92

T=10

I have tried other apps and have been very disappointed.

Will yours work?

Does this (done using the App Store version of the application) look correct, or did I misinterpret your calculation? That specific equation (with variables) is not in the library right now, but I can easily add it for a future version. In the meantime, you can enter and evaluate the calculation yourself, without specific variables.

Hey Brad, this is really cool. Congrats.

I'm not a scientist, just a kid learning to program, but for what it's worth, Pi Cubed is awesome. The visual UI is done really well, and the interaction is very intuitive. Core Animation at its best for sure, which is really cool to see. And the app itself, insanely powerful. How long have you been working on this?

Good demo video too. Props.

Joe

Thanks, I'm glad you like it. This took me approximately 6 months, but I was only working on it during nights and weekends. It was a little more involved than Molecules, which took me only 3 weeks (again, nights and weekends).

Hi,

Great work! Just wanted to say thanks for the App. I've been thinking how nice it would be if such an App existed, and now it does! I love the export to Latex function.

~ Roger

This looks good and I'm going to download it later today. One little app I was thinking of doing at one point was to support matrix operations - little point now since you've done a great job of this app :) ! Anyways, I was thinking that it would be great to be able to perform a matrix transpose by using a twist gesture, and resizing a matrix could be achieved by zooming and pinching.

There's no reason you still couldn't give the matrix manipulation application a try. It will be a little bit before I have matrix math support integrated (I'm working on unit support first, then the other capabilities). The way my interface is structured is also not very conducive to the kind of multitouch manipulation you describe (I use the pinch to zoom in and out of the equation and find that works well by itself).

Doing a small, targeted application (like I did with Molecules) is a great way to get into programming for the iPhone.

I have already downloaded Pi Cubed and promptly recommended it to a friend, who is also very happy with his purchase. Thanks for such a wonderful app and keep up the great work! I would also like to express my interest in a desktop (Mac) version of Pi Cubed — I'd be more than glad to pay for it. :-)

Excellent, I'm glad it works well for you. Don't be shy about posting feature requests or other improvements in the forums. I'm already changing some of my development plans based on feedback expressed there.

radian support for trigonometric functions:

Maybe I missed it, but it would be nice to be capable to write sin(pi/2) = 1 instead of sin(90)=1.

Is it in the app, can you add it ?

Thanks for help..

Thomas

As I indicated here, I plan on adding support for selectable degree units when overall unit support is added. However, I may implement a setting in the meantime that lets you switch between the two.

As an update, this is now a feature of version 1.1.

I am an RN and I have to take Statistics for my masters. Someone told me I might need to buy a TI-85. Would this app. work well for me instead?

Keeping in mind of course that this is elementary statistics, and I have no idea what I'm doing past advanced Algebra.

Thanks!

This application is fully functional for numerical calculations, which you will be doing quite frequently in any statistics course. Operations like the error function and factorials, which play a part in many statistical calculations, are built into the application. Additionally, there are six statistical equations which ship in the onboard equation library. Soon, you will even be able to enter and store your own equations for reference on tests and in your daily work.

That said, the TI-85 has several functions within it that are not currently in Pi Cubed. These include numerical solving of polynomials, unit conversions, and plotting of functions. However, some of these capabilities will be coming soon in updates that I have planned. These functions tend to be more technical in nature and, outside of plotting, I don't know that you would use them all that frequently in a statistics course.

I can't speak for you, but I designed this application to replace my TI-85 with my iPhone, which I always carry with me. In combination with an external graphing application like Grafly, that's just what it's done. If you already have an iPhone or iPod touch, it's also a good deal cheaper at $10 than a TI-85 (which tend to run around $80-$120). I'm also open to suggestions for features to implement in the future to improve the application via email or the forums.

Hi Brad,

I am an arborist and we have a number of formula that we use. Does every arborist need to add in all of these manually or is there some way I can share the equations with my colleagues

If you have some standard sets of equations that would be generally applicable to many users, point me to them and I can build them into the next version of the application.

Otherwise, no, I don't have the greatest support for sharing equations right now. That, along with better equation library backups, is something I'm working on right now and hope to have in the application soon.

I love the user interface, but I'm having trouble expressing small powers of ten. In chemistry, for instance, one of the constants we use is Planck's constant: 6.626 x 10^-34. When I try to enter this into pi cubed - it just registers as zero. do I need to type out the 33 leading zeroes by hand...?

Thanks!

Hey! Like the PI^3 lite app. I will download the Full version when I get home.

I think an OS X version would be widely accpeted. Some thing that would compete with MathCad for the PC.

If you decide to go down that road I would like to be a beta tester. I use Mathcad everyday and wish I could be using it on a Mac.

Keep up the good work,

Brian.

Great to hear that it works well for you. Sorry for the delayed pace of updates lately, because I had to devote some time to finishing the new version of Molecules, among other things.

I do have plans for a Mac version, although I'm still nailing down the exact design and feature set that would be appropriate for that platform. I'm sure that I'll put out a call for beta testers as I get further along on that.

I searched the site and found you support exporting an equation into a graphing application (specifically Grafly - which is no longer available in the app store). What graphing applications will accept you exports?

Thanks in advance.

Unfortunately, Grafly was the only one that I added support for, because it had a means of taking in and plotting equations from other applications. I've tried working with other developers, but none that I've found have added similar support.

If I can find such an application, I'll add in an export capability for it.